LLVM  10.0.0
Functions
of APIs to run individual stages in isolation.

Functions

std::unique_ptr< ModuleSummaryIndex > llvm::ThinLTOCodeGenerator::linkCombinedIndex ()
 Produce the combined summary index from all the bitcode files: "thin-link". More...
 
void llvm::ThinLTOCodeGenerator::promote (Module &Module, ModuleSummaryIndex &Index, const lto::InputFile &File)
 Perform promotion and renaming of exported internal functions, and additionally resolve weak and linkonce symbols. More...
 
void llvm::ThinLTOCodeGenerator::emitImports (Module &Module, StringRef OutputName, ModuleSummaryIndex &Index, const lto::InputFile &File)
 Compute and emit the imported files for module at ModulePath. More...
 
void llvm::ThinLTOCodeGenerator::crossModuleImport (Module &Module, ModuleSummaryIndex &Index, const lto::InputFile &File)
 Perform cross-module importing for the module identified by ModuleIdentifier. More...
 
void llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule (Module &Module, ModuleSummaryIndex &Index, std::map< std::string, GVSummaryMapTy > &ModuleToSummariesForIndex, const lto::InputFile &File)
 Compute the list of summaries needed for importing into module. More...
 
void llvm::ThinLTOCodeGenerator::internalize (Module &Module, ModuleSummaryIndex &Index, const lto::InputFile &File)
 Perform internalization. More...
 
void llvm::ThinLTOCodeGenerator::optimize (Module &Module)
 Perform post-importing ThinLTO optimizations. More...
 
std::string llvm::ThinLTOCodeGenerator::writeGeneratedObject (int count, StringRef CacheEntryPath, const MemoryBuffer &OutputBuffer)
 Write temporary object file to SavedObjectDirectoryPath, write symlink to Cache directory if needed. More...
 

Detailed Description

Function Documentation

◆ crossModuleImport()

void ThinLTOCodeGenerator::crossModuleImport ( Module &  Module,
ModuleSummaryIndex &  Index,
const lto::InputFile &  File 
)

◆ emitImports()

void ThinLTOCodeGenerator::emitImports ( Module &  Module,
StringRef  OutputName,
ModuleSummaryIndex &  Index,
const lto::InputFile &  File 
)

◆ gatherImportedSummariesForModule()

void ThinLTOCodeGenerator::gatherImportedSummariesForModule ( Module &  Module,
ModuleSummaryIndex &  Index,
std::map< std::string, GVSummaryMapTy > &  ModuleToSummariesForIndex,
const lto::InputFile &  File 
)

◆ internalize()

void ThinLTOCodeGenerator::internalize ( Module &  TheModule,
ModuleSummaryIndex &  Index,
const lto::InputFile &  File 
)

◆ linkCombinedIndex()

std::unique_ptr< ModuleSummaryIndex > ThinLTOCodeGenerator::linkCombinedIndex ( )

Produce the combined summary index from all the bitcode files: "thin-link".

Definition at line 566 of file ThinLTOCodeGenerator.cpp.

References llvm::Mod.

◆ optimize()

void ThinLTOCodeGenerator::optimize ( Module &  Module)

Perform post-importing ThinLTO optimizations.

Definition at line 847 of file ThinLTOCodeGenerator.cpp.

References llvm::Module::getTargetTriple().

◆ promote()

void ThinLTOCodeGenerator::promote ( Module &  TheModule,
ModuleSummaryIndex &  Index,
const lto::InputFile &  File 
)

Perform promotion and renaming of exported internal functions, and additionally resolve weak and linkonce symbols.

Perform promotion and renaming of exported internal functions.

Index is updated to reflect linkage changes from weak resolution.

Definition at line 633 of file ThinLTOCodeGenerator.cpp.

References llvm::ModuleSummaryIndex::collectDefinedGVSummariesPerModule(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), llvm::Module::getModuleIdentifier(), llvm::Module::getTargetTriple(), llvm::ModuleSummaryIndex::modulePaths(), llvm::StringMapImpl::size(), llvm::thinLTOInternalizeAndPromoteInIndex(), and llvm::thinLTOResolvePrevailingInModule().

◆ writeGeneratedObject()

std::string ThinLTOCodeGenerator::writeGeneratedObject ( int  count,
StringRef  CacheEntryPath,
const MemoryBuffer &  OutputBuffer 
)

Write temporary object file to SavedObjectDirectoryPath, write symlink to Cache directory if needed.

Write out the generated object file, either from CacheEntryPath or from OutputBuffer, preferring hard-link when possible.

Returns the path to the generated file in SavedObjectsDirectoryPath.

Definition at line 859 of file ThinLTOCodeGenerator.cpp.

References llvm::sys::path::append(), llvm::SmallString< InternalLen >::c_str(), llvm::StringRef::empty(), llvm::sys::fs::exists(), and llvm::sys::fs::remove().