|
LLVM
7.0.0
|
The function importer is automatically importing function from other modules based on the provided summary informations. More...
#include "llvm/Transforms/IPO/FunctionImport.h"
Public Types | |
| using | FunctionsToImportTy = std::unordered_set< GlobalValue::GUID > |
| Set of functions to import from a source module. More... | |
| using | ImportThresholdsTy = DenseMap< GlobalValue::GUID, std::pair< unsigned, const GlobalValueSummary * > > |
| 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. More... | |
| using | ImportMapTy = StringMap< FunctionsToImportTy > |
| The map contains an entry for every module to import from, the key being the module identifier to pass to the ModuleLoader. More... | |
| using | ExportSetTy = std::unordered_set< GlobalValue::GUID > |
| The set contains an entry for every global value the module exports. More... | |
| using | ModuleLoaderTy = std::function< Expected< std::unique_ptr< Module > >(StringRef Identifier)> |
| A function of this type is used to load modules referenced by the index. More... | |
Public Member Functions | |
| FunctionImporter (const ModuleSummaryIndex &Index, ModuleLoaderTy ModuleLoader) | |
| Create a Function Importer. More... | |
| Expected< bool > | importFunctions (Module &M, const ImportMapTy &ImportList) |
Import functions in Module M based on the supplied import list. More... | |
The function importer is automatically importing function from other modules based on the provided summary informations.
Definition at line 34 of file FunctionImport.h.
| using llvm::FunctionImporter::ExportSetTy = std::unordered_set<GlobalValue::GUID> |
The set contains an entry for every global value the module exports.
Definition at line 54 of file FunctionImport.h.
| using llvm::FunctionImporter::FunctionsToImportTy = std::unordered_set<GlobalValue::GUID> |
Set of functions to import from a source module.
Each entry is a set containing all the GUIDs of all functions to import for a source module.
Definition at line 38 of file FunctionImport.h.
The map contains an entry for every module to import from, the key being the module identifier to pass to the ModuleLoader.
The value is the set of functions to import.
Definition at line 51 of file FunctionImport.h.
| using llvm::FunctionImporter::ImportThresholdsTy = DenseMap<GlobalValue::GUID, std::pair<unsigned, const GlobalValueSummary *> > |
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 46 of file FunctionImport.h.
| using llvm::FunctionImporter::ModuleLoaderTy = std::function<Expected<std::unique_ptr<Module> >(StringRef Identifier)> |
A function of this type is used to load modules referenced by the index.
Definition at line 58 of file FunctionImport.h.
|
inline |
Create a Function Importer.
Definition at line 61 of file FunctionImport.h.
References importFunctions().
| Expected< bool > FunctionImporter::importFunctions | ( | Module & | M, |
| const ImportMapTy & | ImportList | ||
| ) |
Import functions in Module M based on the supplied import list.
Definition at line 900 of file FunctionImport.cpp.
References assert(), llvm::dbgs(), llvm::Module::getContext(), llvm::Module::getModuleIdentifier(), and LLVM_DEBUG.
Referenced by doImportingForModule(), and FunctionImporter().
1.8.13