|
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 (const IPOOptions &Opts, function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing, const ModuleSummaryIndex &Index, DenseMap< StringRef, FunctionImporter::ExportSetTy > *ExportLists=nullptr) |
Protected Member Functions | |
| ModuleImportsManager (const IPOOptions &Opts, 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. | |
Protected Attributes | |
| const IPOOptions & | Opts |
| function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> | IsPrevailing |
| const ModuleSummaryIndex & | Index |
| DenseMap< StringRef, FunctionImporter::ExportSetTy > *const | ExportLists |
| DenseMap< StringRef, FunctionImporter::ExportSetTy > | RequiredDeclExports |
Determine the list of imports and exports for each module.
Definition at line 421 of file FunctionImport.cpp.
|
inlineprotected |
Definition at line 442 of file FunctionImport.cpp.
References ExportLists, Index, IsPrevailing, and Opts.
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 1144 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 450 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 1055 of file FunctionImport.cpp.
References assert(), llvm::dbgs(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), ExportLists, getFailureName(), llvm::getHotnessName(), I, Index, IsPrevailing, LLVM_DEBUG, Opts, and llvm::SmallVectorImpl< T >::pop_back_val().
|
static |
Definition at line 789 of file FunctionImport.cpp.
References llvm::dbgs(), ExportLists, Index, IsPrevailing, LLVM_DEBUG, ModuleImportsManager(), Opts, and llvm::UseCtxProfile.
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 1123 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 479 of file FunctionImport.cpp.
References RequiredDeclExports.
|
protected |
Definition at line 434 of file FunctionImport.cpp.
Referenced by addRequiredDeclaration(), computeImportForModule(), create(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 433 of file FunctionImport.cpp.
Referenced by computeImportForModule(), create(), importRequiredDeclaration(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 432 of file FunctionImport.cpp.
Referenced by computeImportForModule(), create(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 430 of file FunctionImport.cpp.
Referenced by computeImportForModule(), create(), ModuleImportsManager(), and WorkloadImportsManager::WorkloadImportsManager().
|
protected |
Definition at line 440 of file FunctionImport.cpp.
Referenced by addRequiredDeclaration(), and requiredDeclExports().