LLVM 20.0.0git
|
The map maintains the list of imports. More...
#include "llvm/Transforms/IPO/FunctionImport.h"
Public Types | |
enum class | AddDefinitionStatus { NoChange , Inserted , ChangedToDefinition } |
Public Member Functions | |
ImportMapTy ()=delete | |
ImportMapTy (ImportIDTable &IDs) | |
AddDefinitionStatus | addDefinition (StringRef FromModule, GlobalValue::GUID GUID) |
void | maybeAddDeclaration (StringRef FromModule, GlobalValue::GUID GUID) |
void | addGUID (StringRef FromModule, GlobalValue::GUID GUID, GlobalValueSummary::ImportKind ImportKind) |
SmallVector< StringRef, 0 > | getSourceModules () const |
std::optional< GlobalValueSummary::ImportKind > | getImportType (StringRef FromModule, GlobalValue::GUID GUID) const |
auto | begin () const |
auto | end () const |
Friends | |
class | SortedImportList |
The map maintains the list of imports.
Conceptually, it is a collection of tuples of the form:
(The name of the source module, GUID, Definition/Declaration)
The name of the source module is the module identifier to pass to the ModuleLoader. The module identifier strings must be owned elsewhere, typically by the in-memory ModuleSummaryIndex the importing decisions are made from (the module path for each summary is owned by the index's module path string table).
Definition at line 184 of file FunctionImport.h.
|
strong |
Enumerator | |
---|---|
NoChange | |
Inserted | |
ChangedToDefinition |
Definition at line 186 of file FunctionImport.h.
|
delete |
|
inline |
Definition at line 198 of file FunctionImport.h.
FunctionImporter::ImportMapTy::AddDefinitionStatus FunctionImporter::ImportMapTy::addDefinition | ( | StringRef | FromModule, |
GlobalValue::GUID | GUID | ||
) |
Definition at line 337 of file FunctionImport.cpp.
References ChangedToDefinition, llvm::FunctionImporter::ImportIDTable::createImportIDs(), Inserted, and NoChange.
Referenced by addGUID(), and computeImportForFunction().
|
inline |
Definition at line 210 of file FunctionImport.h.
References addDefinition(), llvm::GlobalValueSummary::Definition, and maybeAddDeclaration().
Referenced by ComputeCrossModuleImportForModuleFromIndexForTest(), and llvm::lto::initImportList().
|
inline |
Definition at line 228 of file FunctionImport.h.
References llvm::map_iterator().
|
inline |
Definition at line 229 of file FunctionImport.h.
References llvm::map_iterator().
std::optional< GlobalValueSummary::ImportKind > FunctionImporter::ImportMapTy::getImportType | ( | StringRef | FromModule, |
GlobalValue::GUID | GUID | ||
) | const |
Definition at line 370 of file FunctionImport.cpp.
References llvm::GlobalValueSummary::Declaration, and llvm::GlobalValueSummary::Definition.
Referenced by llvm::FunctionImporter::importFunctions().
SmallVector< StringRef, 0 > FunctionImporter::ImportMapTy::getSourceModules | ( | ) | const |
Definition at line 360 of file FunctionImport.cpp.
References llvm::SetVector< T, Vector, Set, N >::insert(), llvm::sort(), and llvm::SetVector< T, Vector, Set, N >::takeVector().
Referenced by llvm::FunctionImporter::importFunctions().
void FunctionImporter::ImportMapTy::maybeAddDeclaration | ( | StringRef | FromModule, |
GlobalValue::GUID | GUID | ||
) |
Definition at line 350 of file FunctionImport.cpp.
Referenced by addGUID(), and computeImportForFunction().
|
friend |
Definition at line 231 of file FunctionImport.h.