LLVM 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::FunctionImporter::ImportMapTy Class Reference

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::ImportKindgetImportType (StringRef FromModule, GlobalValue::GUID GUID) const
 
auto begin () const
 
auto end () const
 

Friends

class SortedImportList
 

Detailed Description

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.

Member Enumeration Documentation

◆ AddDefinitionStatus

Enumerator
NoChange 
Inserted 
ChangedToDefinition 

Definition at line 186 of file FunctionImport.h.

Constructor & Destructor Documentation

◆ ImportMapTy() [1/2]

llvm::FunctionImporter::ImportMapTy::ImportMapTy ( )
delete

◆ ImportMapTy() [2/2]

llvm::FunctionImporter::ImportMapTy::ImportMapTy ( ImportIDTable IDs)
inline

Definition at line 198 of file FunctionImport.h.

Member Function Documentation

◆ addDefinition()

FunctionImporter::ImportMapTy::AddDefinitionStatus FunctionImporter::ImportMapTy::addDefinition ( StringRef  FromModule,
GlobalValue::GUID  GUID 
)

◆ addGUID()

void llvm::FunctionImporter::ImportMapTy::addGUID ( StringRef  FromModule,
GlobalValue::GUID  GUID,
GlobalValueSummary::ImportKind  ImportKind 
)
inline

◆ begin()

auto llvm::FunctionImporter::ImportMapTy::begin ( ) const
inline

Definition at line 228 of file FunctionImport.h.

References llvm::map_iterator().

◆ end()

auto llvm::FunctionImporter::ImportMapTy::end ( ) const
inline

Definition at line 229 of file FunctionImport.h.

References llvm::map_iterator().

◆ getImportType()

std::optional< GlobalValueSummary::ImportKind > FunctionImporter::ImportMapTy::getImportType ( StringRef  FromModule,
GlobalValue::GUID  GUID 
) const

◆ getSourceModules()

SmallVector< StringRef, 0 > FunctionImporter::ImportMapTy::getSourceModules ( ) const

◆ maybeAddDeclaration()

void FunctionImporter::ImportMapTy::maybeAddDeclaration ( StringRef  FromModule,
GlobalValue::GUID  GUID 
)

Definition at line 350 of file FunctionImport.cpp.

Referenced by addGUID(), and computeImportForFunction().

Friends And Related Function Documentation

◆ SortedImportList

friend class SortedImportList
friend

Definition at line 231 of file FunctionImport.h.


The documentation for this class was generated from the following files: