LLVM 20.0.0git
Classes | Functions
llvm::cgdata Namespace Reference

Classes

struct  StreamCacheData
 

Functions

bool hasOutlinedHashTree ()
 
bool hasStableFunctionMap ()
 
const OutlinedHashTreegetOutlinedHashTree ()
 
const StableFunctionMapgetStableFunctionMap ()
 
bool emitCGData ()
 
void publishOutlinedHashTree (std::unique_ptr< OutlinedHashTree > HashTree)
 
void publishStableFunctionMap (std::unique_ptr< StableFunctionMap > FunctionMap)
 
void saveModuleForTwoRounds (const Module &TheModule, unsigned Task, AddStreamFn AddStream)
 Save TheModule before the first codegen round.
 
std::unique_ptr< ModuleloadModuleForTwoRounds (BitcodeModule &OrigModule, unsigned Task, LLVMContext &Context, ArrayRef< StringRef > IRFiles)
 Load the optimized bitcode module for the second codegen round.
 
Expected< stable_hashmergeCodeGenData (ArrayRef< StringRef > ObjectFiles)
 Merge the codegen data from the scratch objects ObjectFiles from the first codegen round.
 
void warn (Error E, StringRef Whence="")
 
void warn (Twine Message, std::string Whence="", std::string Hint="")
 

Function Documentation

◆ emitCGData()

bool llvm::cgdata::emitCGData ( )
inline

◆ getOutlinedHashTree()

const OutlinedHashTree * llvm::cgdata::getOutlinedHashTree ( )
inline

◆ getStableFunctionMap()

const StableFunctionMap * llvm::cgdata::getStableFunctionMap ( )
inline

◆ hasOutlinedHashTree()

bool llvm::cgdata::hasOutlinedHashTree ( )
inline

◆ hasStableFunctionMap()

bool llvm::cgdata::hasStableFunctionMap ( )
inline

◆ loadModuleForTwoRounds()

std::unique_ptr< Module > llvm::cgdata::loadModuleForTwoRounds ( BitcodeModule OrigModule,
unsigned  Task,
LLVMContext Context,
ArrayRef< StringRef IRFiles 
)

Load the optimized bitcode module for the second codegen round.

OrigModule is the original bitcode module. Task identifies the partition number in the parallel code generation process. Context provides the environment settings for module operations. IRFiles contains optimized bitcode module files needed for loading.

Returns
A unique_ptr to the loaded Module, or nullptr if loading fails.

Definition at line 238 of file CodeGenData.cpp.

References llvm::dbgs(), llvm::MemoryBuffer::getMemBuffer(), llvm::BitcodeModule::getModuleIdentifier(), LLVM_DEBUG, llvm::parseBitcodeFile(), and llvm::report_fatal_error().

◆ mergeCodeGenData()

Expected< stable_hash > llvm::cgdata::mergeCodeGenData ( ArrayRef< StringRef ObjectFiles)

◆ publishOutlinedHashTree()

void llvm::cgdata::publishOutlinedHashTree ( std::unique_ptr< OutlinedHashTree HashTree)
inline

◆ publishStableFunctionMap()

void llvm::cgdata::publishStableFunctionMap ( std::unique_ptr< StableFunctionMap FunctionMap)
inline

◆ saveModuleForTwoRounds()

void llvm::cgdata::saveModuleForTwoRounds ( const Module TheModule,
unsigned  Task,
AddStreamFn  AddStream 
)

Save TheModule before the first codegen round.

Task represents the partition number in the parallel code generation process. AddStream is the callback used to add the serialized module to the stream.

Definition at line 224 of file CodeGenData.cpp.

References llvm::dbgs(), llvm::Module::getModuleIdentifier(), LLVM_DEBUG, llvm::report_fatal_error(), llvm::Expected< T >::takeError(), and llvm::WriteBitcodeToFile().

Referenced by llvm::lto::thinBackend().

◆ warn() [1/2]

void llvm::cgdata::warn ( Error  E,
StringRef  Whence = "" 
)

◆ warn() [2/2]

void llvm::cgdata::warn ( Twine  Message,
std::string  Whence = "",
std::string  Hint = "" 
)