|
LLVM 24.0.0git
|
Determine the list of imports and exports for each module. More...
Public Member Functions | |
| virtual | ~ModuleImportsManager ()=default |
| DenseMap< StringRef, FunctionImporter::ExportSetTy > & | requiredDeclExports () |
| Values that must be exported from their defining modules because declarations of them are required in importing modules. | |
| virtual void | computeImportForModule (const GVSummaryMapTy &DefinedGVSummaries, StringRef ModName, FunctionImporter::ImportMapTy &ImportList) |
| Given the list of globals defined in a module, compute the list of imports as well as the list of "exports", i.e. | |
Static Public Member Functions | |
| static std::unique_ptr< ModuleImportsManager > | create (function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing, const ModuleSummaryIndex &Index, DenseMap< StringRef, FunctionImporter::ExportSetTy > *ExportLists=nullptr) |
Protected Member Functions | |
| ModuleImportsManager (function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing, const ModuleSummaryIndex &Index, DenseMap< StringRef, FunctionImporter::ExportSetTy > *ExportLists=nullptr) | |
| virtual bool | canImport (ValueInfo VI) |
| void | importRequiredDeclaration (ValueInfo VI, StringRef CallerModulePath, FunctionImporter::ImportMapTy &ImportList) |
Import a declaration of the callee VI of a call edge requiring a declaration import (see RequiresDeclImport in computeImportForFunction), from a function in CallerModulePath that is defined in or being imported into the current module, and isn't already defined in the current module. | |
| void | addRequiredDeclaration (ValueInfo VI, const GlobalValueSummary *DeclSummary, FunctionImporter::ImportMapTy &ImportList) |
Import a declaration of the callee VI from the module containing DeclSummary, which must be a candidate that is legal to import (i.e. | |
Determine the list of imports and exports for each module.
Definition at line 529 of file FunctionImport.cpp.
|
inlineprotected |
Definition at line 549 of file FunctionImport.cpp.
References ExportLists, Index, and IsPrevailing.
Referenced by create(), and WorkloadImportsManager::WorkloadImportsManager().
|
virtualdefault |
|
protected |
Import a declaration of the callee VI from the module containing DeclSummary, which must be a candidate that is legal to import (i.e.
for which qualifyCalleeCandidates returned ImportFailureReason::None, as is the case for the SummaryForDeclImport returned by selectCallee), and mark it exported from that module. Does nothing if the callee definition was already imported.
Definition at line 1238 of file FunctionImport.cpp.
References llvm::GlobalValueSummary::Definition, ExportLists, llvm::FunctionImporter::ImportMapTy::getImportType(), llvm::FunctionImporter::ImportMapTy::maybeAddDeclaration(), llvm::GlobalValueSummary::modulePath(), and RequiredDeclExports.
Referenced by importRequiredDeclaration().
Definition at line 555 of file FunctionImport.cpp.
|
virtual |
Given the list of globals defined in a module, compute the list of imports as well as the list of "exports", i.e.
the list of symbols referenced from another module (that may require promotion).
Definition at line 1150 of file FunctionImport.cpp.
References assert(), llvm::dbgs(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), ExportLists, getFailureName(), llvm::getHotnessName(), I, llvm::ImportInstrLimit, Index, IsPrevailing, LLVM_DEBUG, llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::PrintImportFailures.
|
static |
Definition at line 892 of file FunctionImport.cpp.
References llvm::dbgs(), ExportLists, Index, IsPrevailing, LLVM_DEBUG, ModuleImportsManager(), llvm::UseCtxProfile, and llvm::WorkloadDefinitions.
Referenced by llvm::ComputeCrossModuleImport(), and ComputeCrossModuleImportForModuleForTest().
|
protected |
Import a declaration of the callee VI of a call edge requiring a declaration import (see RequiresDeclImport in computeImportForFunction), from a function in CallerModulePath that is defined in or being imported into the current module, and isn't already defined in the current module.
This is called when the callee definition is not being imported via that edge, and the callee summaries have not already been qualified by selectCallee (see addRequiredDeclaration). If the definition is (or is subsequently) imported via another edge, it takes precedence over the declaration.
Definition at line 1217 of file FunctionImport.cpp.
References addRequiredDeclaration(), assert(), Index, llvm::FunctionImporter::NoInline, llvm::FunctionImporter::None, qualifyCalleeCandidates(), and llvm::FunctionImporter::TooLarge.
|
inline |
Values that must be exported from their defining modules because declarations of them are required in importing modules.
Definition at line 584 of file FunctionImport.cpp.
References RequiredDeclExports.
|
protected |
Definition at line 541 of file FunctionImport.cpp.
Referenced by addRequiredDeclaration(), computeImportForModule(), create(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 540 of file FunctionImport.cpp.
Referenced by computeImportForModule(), create(), importRequiredDeclaration(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 539 of file FunctionImport.cpp.
Referenced by computeImportForModule(), create(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 547 of file FunctionImport.cpp.
Referenced by addRequiredDeclaration(), and requiredDeclExports().