LLVM 22.0.0git
ModuleImportsManager Class Reference

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

Inheritance diagram for ModuleImportsManager:
[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)
virtual bool canImport (ValueInfo VI)

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 502 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 516 of file FunctionImport.cpp.

References ExportLists, Index, and IsPrevailing.

Referenced by create(), and WorkloadImportsManager::WorkloadImportsManager().

◆ ~ModuleImportsManager()

virtual ModuleImportsManager::~ModuleImportsManager ( )
virtualdefault

Member Function Documentation

◆ canImport()

virtual bool ModuleImportsManager::canImport ( ValueInfo VI)
inlineprotectedvirtual

Definition at line 522 of file FunctionImport.cpp.

◆ 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 1062 of file FunctionImport.cpp.

References assert(), llvm::dbgs(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), ExportLists, getFailureName(), llvm::getHotnessName(), I, ImportInstrLimit, Index, IsPrevailing, LLVM_DEBUG, llvm::SmallVectorImpl< T >::pop_back_val(), and PrintImportFailures.

Referenced by ~ModuleImportsManager().

◆ create()

Member Data Documentation

◆ ExportLists

◆ Index

◆ IsPrevailing


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