|
LLVM 24.0.0git
|
The function importer is automatically importing function from other modules based on the provided summary informations. More...
#include "llvm/Transforms/IPO/FunctionImport.h"
Classes | |
| struct | ImportFailureInfo |
| Information optionally tracked for candidates the importer decided not to import. More... | |
| class | ImportIDTable |
| class | ImportListsTy |
| class | ImportMapTy |
| The map maintains the list of imports. More... | |
| class | SortedImportList |
Public Types | |
| enum class | ImportFailureReason { None , GlobalVar , NotLive , TooLarge , InterposableLinkage , LocalLinkageNotInModule , NotEligible , NoInline } |
| The different reasons selectCallee will chose not to import a candidate. More... | |
| using | ImportThresholdsTy |
| Map of callee GUID considered for import into a given module to a pair consisting of the largest threshold applied when deciding whether to import it and, if we decided to import, a pointer to the summary instance imported. | |
| using | ExportSetTy = DenseSet<ValueInfo> |
| The set contains an entry for every global value that the module exports. | |
| using | ModuleLoaderTy |
| A function of this type is used to load modules referenced by the index. | |
Public Member Functions | |
| FunctionImporter (const ModuleSummaryIndex &Index, ModuleLoaderTy ModuleLoader, bool ClearDSOLocalOnDeclarations) | |
| Create a Function Importer. | |
| LLVM_ABI Expected< bool > | importFunctions (Module &M, const ImportMapTy &ImportList) |
Import functions in Module M based on the supplied import list. | |
Static Public Member Functions | |
| static LLVM_ABI bool | forceImportAll (const cl::LibraryOptionsContext &C) |
The function importer is automatically importing function from other modules based on the provided summary informations.
Definition at line 34 of file FunctionImport.h.
The set contains an entry for every global value that the module exports.
Depending on the user context, this container is allowed to contain definitions, declarations or a mix of both.
Definition at line 308 of file FunctionImport.h.
Map of callee GUID considered for import into a given module to a pair consisting of the largest threshold applied when deciding whether to import it and, if we decided to import, a pointer to the summary instance imported.
If we decided not to import, the summary will be nullptr.
Definition at line 87 of file FunctionImport.h.
A function of this type is used to load modules referenced by the index.
Definition at line 311 of file FunctionImport.h.
|
strong |
The different reasons selectCallee will chose not to import a candidate.
| Enumerator | |
|---|---|
| None | |
| GlobalVar | |
| NotLive | |
| TooLarge | |
| InterposableLinkage | |
| LocalLinkageNotInModule | |
| NotEligible | |
| NoInline | |
Definition at line 38 of file FunctionImport.h.
|
inline |
Create a Function Importer.
Definition at line 315 of file FunctionImport.h.
References llvm::move().
|
static |
Definition at line 2005 of file FunctionImport.cpp.
References C().
Referenced by llvm::thinLTOResolvePrevailingInIndex().
| Expected< bool > FunctionImporter::importFunctions | ( | Module & | M, |
| const ImportMapTy & | ImportList ) |
Import functions in Module M based on the supplied import list.
Definition at line 2011 of file FunctionImport.cpp.
References assert(), llvm::cast(), CC, llvm::detail::DenseSetImpl< ValueT, MapTy >::contains(), llvm::Function::Create(), llvm::createStringError(), llvm::dbgs(), llvm::GlobalValueSummary::Declaration, llvm::GlobalValueSummary::Definition, llvm::dyn_cast(), llvm::dyn_cast_or_null(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::GlobalValue::ExternalLinkage, F, llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::MDString::get(), llvm::GlobalValue::getAliaseeObject(), llvm::SetVector< T, Vector, Set, N >::getArrayRef(), llvm::Module::getContext(), llvm::GlobalValue::getGUIDOrFallback(), llvm::FunctionImporter::ImportMapTy::getImportType(), llvm::Type::getInt64Ty(), llvm::getIPOOptions(), llvm::Module::getModuleIdentifier(), llvm::Value::getName(), llvm::Module::getNamedValue(), llvm::Module::getSourceFileName(), llvm::FunctionImporter::ImportMapTy::getSourceModules(), llvm::SetVector< T, Vector, Set, N >::insert(), llvm::detail::DenseSetImpl< ValueT, MapTy >::insert_range(), internalizeGVsAfterImport(), llvm::invalid_argument, llvm::isa(), LLVM_DEBUG, llvm::GlobalValue::materialize(), llvm::IRMover::move(), llvm::MoveSymbolGUID, protectImplicitRefGlobals(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::renameModuleForThinLTO(), replaceAliasWithAliasee(), llvm::SetVector< T, Vector, Set, N >::size(), llvm::sort(), llvm::Expected< T >::takeError(), llvm::toString(), and llvm::UpgradeDebugInfo().
Referenced by crossImportIntoModule(), doImportingForModuleForTest(), and llvm::lto::thinBackend().