LLVM 24.0.0git
llvm::cgdata Namespace Reference

Classes

struct  StreamCacheData

Functions

bool hasOutlinedHashTree (const cl::LibraryOptionsContext &LibraryOptions)
bool hasStableFunctionMap (const cl::LibraryOptionsContext &LibraryOptions)
const OutlinedHashTree * getOutlinedHashTree (const cl::LibraryOptionsContext &LibraryOptions)
const StableFunctionMap * getStableFunctionMap (const cl::LibraryOptionsContext &LibraryOptions)
bool emitCGData (const cl::LibraryOptionsContext &LibraryOptions)
void publishOutlinedHashTree (const cl::LibraryOptionsContext &LibraryOptions, std::unique_ptr< OutlinedHashTree > HashTree)
void publishStableFunctionMap (const cl::LibraryOptionsContext &LibraryOptions, std::unique_ptr< StableFunctionMap > FunctionMap)
LLVM_ABI bool thinLTOTwoRounds (const cl::LibraryOptionsContext &LibraryOptions)
 Returns whether ThinLTO runs two rounds of code generation (-codegen-data-thinlto-two-rounds).
LLVM_ABI void saveModuleForTwoRounds (const Module &TheModule, unsigned Task, AddStreamFn AddStream)
 Save TheModule before the first codegen round.
LLVM_ABI std::unique_ptr< Module > loadModuleForTwoRounds (BitcodeModule &OrigModule, unsigned Task, LLVMContext &Context, ArrayRef< StringRef > IRFiles)
 Load the optimized bitcode module for the second codegen round.
LLVM_ABI Expected< stable_hash > mergeCodeGenData (const cl::LibraryOptionsContext &LibraryOptions, ArrayRef< StringRef > ObjectFiles)
 Merge the codegen data from the scratch objects ObjectFiles from the first codegen round.
LLVM_ABI void warn (Error E, StringRef Whence="")
LLVM_ABI void warn (Twine Message, StringRef Whence="", StringRef Hint="")

Function Documentation

◆ emitCGData()

bool llvm::cgdata::emitCGData ( const cl::LibraryOptionsContext & LibraryOptions)
inline

◆ getOutlinedHashTree()

const OutlinedHashTree * llvm::cgdata::getOutlinedHashTree ( const cl::LibraryOptionsContext & LibraryOptions)
inline

◆ getStableFunctionMap()

const StableFunctionMap * llvm::cgdata::getStableFunctionMap ( const cl::LibraryOptionsContext & LibraryOptions)
inline

◆ hasOutlinedHashTree()

bool llvm::cgdata::hasOutlinedHashTree ( const cl::LibraryOptionsContext & LibraryOptions)
inline

◆ hasStableFunctionMap()

bool llvm::cgdata::hasStableFunctionMap ( const cl::LibraryOptionsContext & LibraryOptions)
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 236 of file CodeGenData.cpp.

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

◆ mergeCodeGenData()

◆ publishOutlinedHashTree()

void llvm::cgdata::publishOutlinedHashTree ( const cl::LibraryOptionsContext & LibraryOptions,
std::unique_ptr< OutlinedHashTree > HashTree )
inline

◆ publishStableFunctionMap()

void llvm::cgdata::publishStableFunctionMap ( const cl::LibraryOptionsContext & LibraryOptions,
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 219 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().

◆ thinLTOTwoRounds()

bool llvm::cgdata::thinLTOTwoRounds ( const cl::LibraryOptionsContext & LibraryOptions)

Returns whether ThinLTO runs two rounds of code generation (-codegen-data-thinlto-two-rounds).

Definition at line 111 of file CodeGenData.cpp.

References llvm::cl::LibraryOptionsContext::get().

◆ warn() [1/2]

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

◆ warn() [2/2]

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