LLVM 22.0.0git
|
Functions | |
LLVM_ABI std::unique_ptr< ModuleSummaryIndex > | llvm::ThinLTOCodeGenerator::linkCombinedIndex () |
Produce the combined summary index from all the bitcode files: "thin-link". | |
LLVM_ABI 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. | |
LLVM_ABI void | llvm::ThinLTOCodeGenerator::emitImports (Module &Module, StringRef OutputName, ModuleSummaryIndex &Index, const lto::InputFile &File) |
Compute and emit the imported files for module at ModulePath . | |
LLVM_ABI void | llvm::ThinLTOCodeGenerator::crossModuleImport (Module &Module, ModuleSummaryIndex &Index, const lto::InputFile &File) |
Perform cross-module importing for the module identified by ModuleIdentifier. | |
LLVM_ABI void | llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule (Module &Module, ModuleSummaryIndex &Index, ModuleToSummariesForIndexTy &ModuleToSummariesForIndex, GVSummaryPtrSet &DecSummaries, const lto::InputFile &File) |
Compute the list of summaries and the subset of declaration summaries needed for importing into module. | |
LLVM_ABI void | llvm::ThinLTOCodeGenerator::internalize (Module &Module, ModuleSummaryIndex &Index, const lto::InputFile &File) |
Perform internalization. | |
LLVM_ABI void | llvm::ThinLTOCodeGenerator::optimize (Module &Module) |
Perform post-importing ThinLTO optimizations. | |
LLVM_ABI 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. |
void ThinLTOCodeGenerator::crossModuleImport | ( | Module & | Module, |
ModuleSummaryIndex & | Index, | ||
const lto::InputFile & | File ) |
Perform cross-module importing for the module identified by ModuleIdentifier.
Definition at line 718 of file ThinLTOCodeGenerator.cpp.
References addUsedSymbolToPreservedGUID(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), computeGUIDPreservedSymbols(), computePrevailingCopies(), crossImportIntoModule(), generateModuleMap(), llvm::Module::getModuleIdentifier(), and llvm::Module::getTargetTriple().
void ThinLTOCodeGenerator::emitImports | ( | Module & | Module, |
StringRef | OutputName, | ||
ModuleSummaryIndex & | Index, | ||
const lto::InputFile & | File ) |
Compute and emit the imported files for module at ModulePath
.
Emit the list of files needed for importing into module.
Definition at line 796 of file ThinLTOCodeGenerator.cpp.
References addUsedSymbolToPreservedGUID(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), computeGUIDPreservedSymbols(), computePrevailingCopies(), llvm::EmitImportsFiles(), llvm::gatherImportedSummariesForModule(), llvm::Module::getModuleIdentifier(), llvm::Module::getTargetTriple(), and llvm::report_fatal_error().
void ThinLTOCodeGenerator::gatherImportedSummariesForModule | ( | Module & | Module, |
ModuleSummaryIndex & | Index, | ||
ModuleToSummariesForIndexTy & | ModuleToSummariesForIndex, | ||
GVSummaryPtrSet & | DecSummaries, | ||
const lto::InputFile & | File ) |
Compute the list of summaries and the subset of declaration summaries needed for importing into module.
Compute the list of summaries needed for importing into module.
Definition at line 757 of file ThinLTOCodeGenerator.cpp.
References addUsedSymbolToPreservedGUID(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), computeGUIDPreservedSymbols(), computePrevailingCopies(), llvm::gatherImportedSummariesForModule(), llvm::Module::getModuleIdentifier(), and llvm::Module::getTargetTriple().
void ThinLTOCodeGenerator::internalize | ( | Module & | TheModule, |
ModuleSummaryIndex & | Index, | ||
const lto::InputFile & | File ) |
Perform internalization.
Index is updated to reflect linkage changes.
Runs promote and internalization together. Index is updated to reflect linkage changes.
Definition at line 845 of file ThinLTOCodeGenerator.cpp.
References addUsedSymbolToPreservedGUID(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), computeGUIDPreservedSymbols(), computePrevailingCopies(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::empty(), llvm::Module::getModuleIdentifier(), llvm::Module::getTargetTriple(), initTMBuilder(), promoteModule(), resolvePrevailingInIndex(), llvm::thinLTOFinalizeInModule(), llvm::thinLTOInternalizeAndPromoteInIndex(), and llvm::thinLTOInternalizeModule().
std::unique_ptr< ModuleSummaryIndex > ThinLTOCodeGenerator::linkCombinedIndex | ( | ) |
Produce the combined summary index from all the bitcode files: "thin-link".
Definition at line 600 of file ThinLTOCodeGenerator.cpp.
References llvm::errs(), llvm::logAllUnhandledErrors(), and llvm::Mod.
Referenced by run().
void ThinLTOCodeGenerator::optimize | ( | Module & | Module | ) |
Perform post-importing ThinLTO optimizations.
Definition at line 908 of file ThinLTOCodeGenerator.cpp.
References llvm::Module::getTargetTriple(), initTMBuilder(), and optimizeModule().
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 666 of file ThinLTOCodeGenerator.cpp.
References addUsedSymbolToPreservedGUID(), llvm::ComputeCrossModuleImport(), computeDeadSymbolsInIndex(), computeGUIDPreservedSymbols(), computePrevailingCopies(), llvm::Module::getModuleIdentifier(), llvm::Module::getTargetTriple(), promoteModule(), resolvePrevailingInIndex(), llvm::thinLTOFinalizeInModule(), and llvm::thinLTOInternalizeAndPromoteInIndex().
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 920 of file ThinLTOCodeGenerator.cpp.
References llvm::sys::path::append(), llvm::SmallString< InternalLen >::c_str(), llvm::sys::fs::copy_file(), llvm::count(), llvm::sys::fs::create_hard_link(), llvm::StringRef::empty(), llvm::errs(), llvm::sys::fs::exists(), OutputBuffer::getBuffer(), llvm::sys::fs::OF_None, llvm::sys::fs::remove(), and llvm::report_fatal_error().
Referenced by run().