LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ModuleImportsManager Class Reference

Determine the list of imports and exports for each module. More...

Inheritance diagram for ModuleImportsManager:
Inheritance graph
[legend]

Public Member Functions

virtual ~ModuleImportsManager ()=default
 
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< ModuleImportsManagercreate (function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing, const ModuleSummaryIndex &Index, DenseMap< StringRef, FunctionImporter::ExportSetTy > *ExportLists=nullptr)
 

Protected Member Functions

 ModuleImportsManager (function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing, const ModuleSummaryIndex &Index, DenseMap< StringRef, FunctionImporter::ExportSetTy > *ExportLists=nullptr)
 

Protected Attributes

function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)> IsPrevailing
 
const ModuleSummaryIndexIndex
 
DenseMap< StringRef, FunctionImporter::ExportSetTy > *const ExportLists
 

Detailed Description

Determine the list of imports and exports for each module.

Definition at line 404 of file FunctionImport.cpp.

Constructor & Destructor Documentation

◆ ModuleImportsManager()

ModuleImportsManager::ModuleImportsManager ( function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)>  IsPrevailing,
const ModuleSummaryIndex Index,
DenseMap< StringRef, FunctionImporter::ExportSetTy > *  ExportLists = nullptr 
)
inlineprotected

Definition at line 411 of file FunctionImport.cpp.

◆ ~ModuleImportsManager()

virtual ModuleImportsManager::~ModuleImportsManager ( )
virtualdefault

Member Function Documentation

◆ computeImportForModule()

void ModuleImportsManager::computeImportForModule ( const GVSummaryMapTy DefinedGVSummaries,
StringRef  ModName,
FunctionImporter::ImportMapTy ImportList 
)
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 856 of file FunctionImport.cpp.

References assert(), computeImportForFunction(), llvm::dbgs(), llvm::SmallVectorBase< Size_T >::empty(), ExportLists, getFailureName(), llvm::getHotnessName(), I, ImportInstrLimit, IsPrevailing, LLVM_DEBUG, llvm::SmallVectorImpl< T >::pop_back_val(), and PrintImportFailures.

◆ create()

std::unique_ptr< ModuleImportsManager > ModuleImportsManager::create ( function_ref< bool(GlobalValue::GUID, const GlobalValueSummary *)>  IsPrevailing,
const ModuleSummaryIndex Index,
DenseMap< StringRef, FunctionImporter::ExportSetTy > *  ExportLists = nullptr 
)
static

Member Data Documentation

◆ ExportLists

DenseMap<StringRef, FunctionImporter::ExportSetTy>* const ModuleImportsManager::ExportLists
protected

Definition at line 409 of file FunctionImport.cpp.

Referenced by computeImportForModule(), and create().

◆ Index

const ModuleSummaryIndex& ModuleImportsManager::Index
protected

Definition at line 408 of file FunctionImport.cpp.

◆ IsPrevailing

function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> ModuleImportsManager::IsPrevailing
protected

Definition at line 407 of file FunctionImport.cpp.

Referenced by computeImportForModule(), and create().


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