LLVM 22.0.0git
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)
LLVM_ABI AddDefinitionStatus addDefinition (StringRef FromModule, GlobalValue::GUID GUID)
LLVM_ABI void maybeAddDeclaration (StringRef FromModule, GlobalValue::GUID GUID)
void addGUID (StringRef FromModule, GlobalValue::GUID GUID, GlobalValueSummary::ImportKind ImportKind)
LLVM_ABI SmallVector< StringRef, 0 > getSourceModules () const
LLVM_ABI 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 185 of file FunctionImport.h.

Member Enumeration Documentation

◆ AddDefinitionStatus

Enumerator
NoChange 
Inserted 
ChangedToDefinition 

Definition at line 187 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 199 of file FunctionImport.h.

Member Function Documentation

◆ addDefinition()

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

Definition at line 347 of file FunctionImport.cpp.

References ChangedToDefinition, Inserted, and NoChange.

Referenced by addGUID().

◆ 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 230 of file FunctionImport.h.

References llvm::map_iterator().

◆ end()

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

Definition at line 231 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 360 of file FunctionImport.cpp.

Referenced by addGUID().

◆ SortedImportList

friend class SortedImportList
friend

Definition at line 233 of file FunctionImport.h.

References SortedImportList.

Referenced by SortedImportList.


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