LLVM 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::ModuleSummaryIndex Class Reference

Class to hold module path string table and global value map, and encapsulate methods for operating on them. More...

#include "llvm/IR/ModuleSummaryIndex.h"

Public Types

typedef ModulePathStringTableTy::value_type ModuleInfo
 

Public Member Functions

 ModuleSummaryIndex (bool HaveGVs, bool EnableSplitLTOUnit=false, bool UnifiedLTO=false)
 
bool haveGVs () const
 
uint64_t getFlags () const
 
void setFlags (uint64_t Flags)
 
uint64_t getBlockCount () const
 
void addBlockCount (uint64_t C)
 
void setBlockCount (uint64_t C)
 
gvsummary_iterator begin ()
 
const_gvsummary_iterator begin () const
 
gvsummary_iterator end ()
 
const_gvsummary_iterator end () const
 
size_t size () const
 
const std::vector< uint64_t > & stackIds () const
 
unsigned addOrGetStackIdIndex (uint64_t StackId)
 
uint64_t getStackIdAtIndex (unsigned Index) const
 
void releaseTemporaryMemory ()
 
FunctionSummary calculateCallGraphRoot ()
 
bool withGlobalValueDeadStripping () const
 
void setWithGlobalValueDeadStripping ()
 
bool withAttributePropagation () const
 
void setWithAttributePropagation ()
 
bool withDSOLocalPropagation () const
 
void setWithDSOLocalPropagation ()
 
bool withWholeProgramVisibility () const
 
void setWithWholeProgramVisibility ()
 
bool isReadOnly (const GlobalVarSummary *GVS) const
 
bool isWriteOnly (const GlobalVarSummary *GVS) const
 
bool hasSyntheticEntryCounts () const
 
void setHasSyntheticEntryCounts ()
 
bool withSupportsHotColdNew () const
 
void setWithSupportsHotColdNew ()
 
bool skipModuleByDistributedBackend () const
 
void setSkipModuleByDistributedBackend ()
 
bool enableSplitLTOUnit () const
 
void setEnableSplitLTOUnit ()
 
bool hasUnifiedLTO () const
 
void setUnifiedLTO ()
 
bool partiallySplitLTOUnits () const
 
void setPartiallySplitLTOUnits ()
 
bool hasParamAccess () const
 
bool isGlobalValueLive (const GlobalValueSummary *GVS) const
 
bool isGUIDLive (GlobalValue::GUID GUID) const
 
ValueInfo getValueInfo (const GlobalValueSummaryMapTy::value_type &R) const
 Return a ValueInfo for the index value_type (convenient when iterating index).
 
ValueInfo getValueInfo (GlobalValue::GUID GUID) const
 Return a ValueInfo for GUID if it exists, otherwise return ValueInfo().
 
ValueInfo getOrInsertValueInfo (GlobalValue::GUID GUID)
 Return a ValueInfo for GUID.
 
StringRef saveString (StringRef String)
 
ValueInfo getOrInsertValueInfo (GlobalValue::GUID GUID, StringRef Name)
 Return a ValueInfo for GUID setting value Name.
 
ValueInfo getOrInsertValueInfo (const GlobalValue *GV)
 Return a ValueInfo for GV and mark it as belonging to GV.
 
GlobalValue::GUID getGUIDFromOriginalID (GlobalValue::GUID OriginalID) const
 Return the GUID for OriginalId in the OidGuidMap.
 
std::set< std::string > & cfiFunctionDefs ()
 
const std::set< std::string > & cfiFunctionDefs () const
 
std::set< std::string > & cfiFunctionDecls ()
 
const std::set< std::string > & cfiFunctionDecls () const
 
void addGlobalValueSummary (const GlobalValue &GV, std::unique_ptr< GlobalValueSummary > Summary)
 Add a global value summary for a value.
 
void addGlobalValueSummary (StringRef ValueName, std::unique_ptr< GlobalValueSummary > Summary)
 Add a global value summary for a value of the given name.
 
void addGlobalValueSummary (ValueInfo VI, std::unique_ptr< GlobalValueSummary > Summary)
 Add a global value summary for the given ValueInfo.
 
void addOriginalName (GlobalValue::GUID ValueGUID, GlobalValue::GUID OrigGUID)
 Add an original name for the value of the given GUID.
 
GlobalValueSummaryfindSummaryInModule (ValueInfo VI, StringRef ModuleId) const
 Find the summary for ValueInfo VI in module ModuleId, or nullptr if not found.
 
GlobalValueSummaryfindSummaryInModule (GlobalValue::GUID ValueGUID, StringRef ModuleId) const
 Find the summary for global GUID in module ModuleId, or nullptr if not found.
 
GlobalValueSummarygetGlobalValueSummary (const GlobalValue &GV, bool PerModuleIndex=true) const
 Returns the first GlobalValueSummary for GV, asserting that there is only one if PerModuleIndex.
 
GlobalValueSummarygetGlobalValueSummary (GlobalValue::GUID ValueGUID, bool PerModuleIndex=true) const
 Returns the first GlobalValueSummary for ValueGUID, asserting that there is only one if PerModuleIndex.
 
const StringMap< ModuleHash > & modulePaths () const
 Table of modules, containing module hash and id.
 
StringMap< ModuleHash > & modulePaths ()
 Table of modules, containing hash and id.
 
const ModuleHashgetModuleHash (const StringRef ModPath) const
 Get the module SHA1 hash recorded for the given module path.
 
ModuleInfoaddModule (StringRef ModPath, ModuleHash Hash=ModuleHash{{0}})
 Add a new module with the given Hash, mapped to the given ModID, and return a reference to the module.
 
ModuleInfogetModule (StringRef ModPath)
 Return module entry for module with the given ModPath.
 
const ModuleInfogetModule (StringRef ModPath) const
 Return module entry for module with the given ModPath.
 
bool hasExportedFunctions (const Module &M) const
 Check if the given Module has any functions available for exporting in the index.
 
const TypeIdSummaryMapTytypeIds () const
 
TypeIdSummarygetOrInsertTypeIdSummary (StringRef TypeId)
 Return an existing or new TypeIdSummary entry for TypeId.
 
const TypeIdSummarygetTypeIdSummary (StringRef TypeId) const
 This returns either a pointer to the type id summary (if present in the summary map) or null (if not present).
 
TypeIdSummarygetTypeIdSummary (StringRef TypeId)
 
const auto & typeIdCompatibleVtableMap () const
 
TypeIdCompatibleVtableInfogetOrInsertTypeIdCompatibleVtableSummary (StringRef TypeId)
 Return an existing or new TypeIdCompatibleVtableMap entry for TypeId.
 
std::optional< TypeIdCompatibleVtableInfogetTypeIdCompatibleVtableSummary (StringRef TypeId) const
 For the given TypeId, this returns the TypeIdCompatibleVtableMap entry if present in the summary map.
 
void collectDefinedFunctionsForModule (StringRef ModulePath, GVSummaryMapTy &GVSummaryMap) const
 Collect for the given module the list of functions it defines (GUID -> Summary).
 
template<class Map >
void collectDefinedGVSummariesPerModule (Map &ModuleToDefinedGVSummaries) const
 Collect for each module the list of Summaries it defines (GUID -> Summary).
 
void print (raw_ostream &OS, bool IsForDebug=false) const
 Print to an output stream.
 
void dump () const
 Dump to stderr (for debugging).
 
void exportToDot (raw_ostream &OS, const DenseSet< GlobalValue::GUID > &GUIDPreservedSymbols) const
 Export summary to dot file for GraphViz.
 
void dumpSCCs (raw_ostream &OS)
 Print out strongly connected components for debugging.
 
void propagateAttributes (const DenseSet< GlobalValue::GUID > &PreservedSymbols)
 Do the access attribute and DSOLocal propagation in combined index.
 
bool canImportGlobalVar (const GlobalValueSummary *S, bool AnalyzeRefs) const
 Checks if we can import global variable from another module.
 

Static Public Member Functions

static constexpr const chargetRegularLTOModuleName ()
 
static void discoverNodes (ValueInfo V, std::map< ValueInfo, bool > &FunctionHasParent)
 Convenience function for doing a DFS on a ValueInfo.
 
static std::string getGlobalNameForLocal (StringRef Name, ModuleHash ModHash)
 Convenience method for creating a promoted global name for the given value name of a local, and its original module's ID.
 
static std::string getGlobalNameForLocal (StringRef Name, StringRef Suffix)
 
static StringRef getOriginalNameBeforePromote (StringRef Name)
 Helper to obtain the unpromoted name for a global value (or the original name if not promoted).
 

Static Public Attributes

static constexpr uint64_t BitcodeSummaryVersion = 9
 

Detailed Description

Class to hold module path string table and global value map, and encapsulate methods for operating on them.

Definition at line 1312 of file ModuleSummaryIndex.h.

Member Typedef Documentation

◆ ModuleInfo

Definition at line 1760 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

◆ ModuleSummaryIndex()

llvm::ModuleSummaryIndex::ModuleSummaryIndex ( bool  HaveGVs,
bool  EnableSplitLTOUnit = false,
bool  UnifiedLTO = false 
)
inline

Definition at line 1423 of file ModuleSummaryIndex.h.

Member Function Documentation

◆ addBlockCount()

void llvm::ModuleSummaryIndex::addBlockCount ( uint64_t  C)
inline

Definition at line 1446 of file ModuleSummaryIndex.h.

References llvm::CallingConv::C.

◆ addGlobalValueSummary() [1/3]

void llvm::ModuleSummaryIndex::addGlobalValueSummary ( const GlobalValue GV,
std::unique_ptr< GlobalValueSummary Summary 
)
inline

Add a global value summary for a value.

Definition at line 1648 of file ModuleSummaryIndex.h.

References addGlobalValueSummary(), and getOrInsertValueInfo().

Referenced by addGlobalValueSummary().

◆ addGlobalValueSummary() [2/3]

void llvm::ModuleSummaryIndex::addGlobalValueSummary ( StringRef  ValueName,
std::unique_ptr< GlobalValueSummary Summary 
)
inline

Add a global value summary for a value of the given name.

Definition at line 1654 of file ModuleSummaryIndex.h.

References addGlobalValueSummary(), llvm::GlobalValue::getGUID(), and getOrInsertValueInfo().

◆ addGlobalValueSummary() [3/3]

void llvm::ModuleSummaryIndex::addGlobalValueSummary ( ValueInfo  VI,
std::unique_ptr< GlobalValueSummary Summary 
)
inline

Add a global value summary for the given ValueInfo.

Definition at line 1661 of file ModuleSummaryIndex.h.

References addOriginalName().

◆ addModule()

ModuleInfo * llvm::ModuleSummaryIndex::addModule ( StringRef  ModPath,
ModuleHash  Hash = ModuleHash{{0}} 
)
inline

Add a new module with the given Hash, mapped to the given ModID, and return a reference to the module.

Definition at line 1764 of file ModuleSummaryIndex.h.

◆ addOrGetStackIdIndex()

unsigned llvm::ModuleSummaryIndex::addOrGetStackIdIndex ( uint64_t  StackId)
inline

◆ addOriginalName()

void llvm::ModuleSummaryIndex::addOriginalName ( GlobalValue::GUID  ValueGUID,
GlobalValue::GUID  OrigGUID 
)
inline

Add an original name for the value of the given GUID.

Definition at line 1673 of file ModuleSummaryIndex.h.

Referenced by addGlobalValueSummary().

◆ begin() [1/2]

gvsummary_iterator llvm::ModuleSummaryIndex::begin ( )
inline

Definition at line 1449 of file ModuleSummaryIndex.h.

◆ begin() [2/2]

const_gvsummary_iterator llvm::ModuleSummaryIndex::begin ( ) const
inline

Definition at line 1450 of file ModuleSummaryIndex.h.

◆ calculateCallGraphRoot()

FunctionSummary llvm::ModuleSummaryIndex::calculateCallGraphRoot ( )
inline

◆ canImportGlobalVar()

bool ModuleSummaryIndex::canImportGlobalVar ( const GlobalValueSummary S,
bool  AnalyzeRefs 
) const

◆ cfiFunctionDecls() [1/2]

std::set< std::string > & llvm::ModuleSummaryIndex::cfiFunctionDecls ( )
inline

Definition at line 1644 of file ModuleSummaryIndex.h.

◆ cfiFunctionDecls() [2/2]

const std::set< std::string > & llvm::ModuleSummaryIndex::cfiFunctionDecls ( ) const
inline

Definition at line 1645 of file ModuleSummaryIndex.h.

◆ cfiFunctionDefs() [1/2]

std::set< std::string > & llvm::ModuleSummaryIndex::cfiFunctionDefs ( )
inline

Definition at line 1641 of file ModuleSummaryIndex.h.

◆ cfiFunctionDefs() [2/2]

const std::set< std::string > & llvm::ModuleSummaryIndex::cfiFunctionDefs ( ) const
inline

Definition at line 1642 of file ModuleSummaryIndex.h.

◆ collectDefinedFunctionsForModule()

void ModuleSummaryIndex::collectDefinedFunctionsForModule ( StringRef  ModulePath,
GVSummaryMapTy GVSummaryMap 
) const

Collect for the given module the list of functions it defines (GUID -> Summary).

Definition at line 164 of file ModuleSummaryIndex.cpp.

◆ collectDefinedGVSummariesPerModule()

template<class Map >
void llvm::ModuleSummaryIndex::collectDefinedGVSummariesPerModule ( Map &  ModuleToDefinedGVSummaries) const
inline

Collect for each module the list of Summaries it defines (GUID -> Summary).

Definition at line 1851 of file ModuleSummaryIndex.h.

Referenced by exportToDot().

◆ discoverNodes()

static void llvm::ModuleSummaryIndex::discoverNodes ( ValueInfo  V,
std::map< ValueInfo, bool > &  FunctionHasParent 
)
inlinestatic

Convenience function for doing a DFS on a ValueInfo.

Marks the function in the FunctionHasParent map.

Definition at line 1482 of file ModuleSummaryIndex.h.

References assert(), llvm::CallingConv::C, discoverNodes(), and F.

Referenced by calculateCallGraphRoot(), and discoverNodes().

◆ dump()

LLVM_DUMP_METHOD void ModuleSummaryIndex::dump ( ) const

Dump to stderr (for debugging).

Definition at line 5295 of file AsmWriter.cpp.

References llvm::dbgs(), and print().

◆ dumpSCCs()

LLVM_DUMP_METHOD void ModuleSummaryIndex::dumpSCCs ( raw_ostream OS)

Print out strongly connected components for debugging.

Definition at line 367 of file ModuleSummaryIndex.cpp.

References F, and I.

◆ enableSplitLTOUnit()

bool llvm::ModuleSummaryIndex::enableSplitLTOUnit ( ) const
inline

Definition at line 1581 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ end() [1/2]

gvsummary_iterator llvm::ModuleSummaryIndex::end ( )
inline

Definition at line 1451 of file ModuleSummaryIndex.h.

◆ end() [2/2]

const_gvsummary_iterator llvm::ModuleSummaryIndex::end ( ) const
inline

Definition at line 1452 of file ModuleSummaryIndex.h.

◆ exportToDot()

void ModuleSummaryIndex::exportToDot ( raw_ostream OS,
const DenseSet< GlobalValue::GUID > &  GUIDPreservedSymbols 
) const

◆ findSummaryInModule() [1/2]

GlobalValueSummary * llvm::ModuleSummaryIndex::findSummaryInModule ( GlobalValue::GUID  ValueGUID,
StringRef  ModuleId 
) const
inline

Find the summary for global GUID in module ModuleId, or nullptr if not found.

Definition at line 1699 of file ModuleSummaryIndex.h.

References findSummaryInModule(), and getValueInfo().

◆ findSummaryInModule() [2/2]

GlobalValueSummary * llvm::ModuleSummaryIndex::findSummaryInModule ( ValueInfo  VI,
StringRef  ModuleId 
) const
inline

Find the summary for ValueInfo VI in module ModuleId, or nullptr if not found.

Definition at line 1685 of file ModuleSummaryIndex.h.

References llvm::find_if().

Referenced by findSummaryInModule().

◆ getBlockCount()

uint64_t llvm::ModuleSummaryIndex::getBlockCount ( ) const
inline

Definition at line 1445 of file ModuleSummaryIndex.h.

◆ getFlags()

uint64_t ModuleSummaryIndex::getFlags ( ) const

◆ getGlobalNameForLocal() [1/2]

static std::string llvm::ModuleSummaryIndex::getGlobalNameForLocal ( StringRef  Name,
ModuleHash  ModHash 
)
inlinestatic

Convenience method for creating a promoted global name for the given value name of a local, and its original module's ID.

Definition at line 1738 of file ModuleSummaryIndex.h.

References getGlobalNameForLocal(), and Name.

Referenced by getGlobalNameForLocal(), and llvm::updateIndexWPDForExports().

◆ getGlobalNameForLocal() [2/2]

static std::string llvm::ModuleSummaryIndex::getGlobalNameForLocal ( StringRef  Name,
StringRef  Suffix 
)
inlinestatic

Definition at line 1744 of file ModuleSummaryIndex.h.

References Name.

◆ getGlobalValueSummary() [1/2]

GlobalValueSummary * llvm::ModuleSummaryIndex::getGlobalValueSummary ( const GlobalValue GV,
bool  PerModuleIndex = true 
) const
inline

Returns the first GlobalValueSummary for GV, asserting that there is only one if PerModuleIndex.

Definition at line 1709 of file ModuleSummaryIndex.h.

References assert(), getGlobalValueSummary(), llvm::GlobalValue::getGUID(), and llvm::Value::hasName().

Referenced by getGlobalValueSummary().

◆ getGlobalValueSummary() [2/2]

GlobalValueSummary * ModuleSummaryIndex::getGlobalValueSummary ( GlobalValue::GUID  ValueGUID,
bool  PerModuleIndex = true 
) const

Returns the first GlobalValueSummary for ValueGUID, asserting that there is only one if PerModuleIndex.

Definition at line 182 of file ModuleSummaryIndex.cpp.

References assert(), and getValueInfo().

◆ getGUIDFromOriginalID()

GlobalValue::GUID llvm::ModuleSummaryIndex::getGUIDFromOriginalID ( GlobalValue::GUID  OriginalID) const
inline

Return the GUID for OriginalId in the OidGuidMap.

Definition at line 1636 of file ModuleSummaryIndex.h.

References I.

Referenced by findValueInfoForFunc().

◆ getModule() [1/2]

ModuleInfo * llvm::ModuleSummaryIndex::getModule ( StringRef  ModPath)
inline

Return module entry for module with the given ModPath.

Definition at line 1769 of file ModuleSummaryIndex.h.

References assert(), llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().

◆ getModule() [2/2]

const ModuleInfo * llvm::ModuleSummaryIndex::getModule ( StringRef  ModPath) const
inline

Return module entry for module with the given ModPath.

Definition at line 1776 of file ModuleSummaryIndex.h.

References assert(), llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().

◆ getModuleHash()

const ModuleHash & llvm::ModuleSummaryIndex::getModuleHash ( const StringRef  ModPath) const
inline

Get the module SHA1 hash recorded for the given module path.

Definition at line 1730 of file ModuleSummaryIndex.h.

References assert(), llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().

◆ getOriginalNameBeforePromote()

static StringRef llvm::ModuleSummaryIndex::getOriginalNameBeforePromote ( StringRef  Name)
inlinestatic

Helper to obtain the unpromoted name for a global value (or the original name if not promoted).

Split off the rightmost ".llvm.${hash}" suffix, because it is possible in certain clients (not clang at the moment) for two rounds of ThinLTO optimization and therefore promotion to occur.

Definition at line 1755 of file ModuleSummaryIndex.h.

References Name.

Referenced by findValueInfoForFunc(), and llvm::thinLTOInternalizeModule().

◆ getOrInsertTypeIdCompatibleVtableSummary()

TypeIdCompatibleVtableInfo & llvm::ModuleSummaryIndex::getOrInsertTypeIdCompatibleVtableSummary ( StringRef  TypeId)
inline

Return an existing or new TypeIdCompatibleVtableMap entry for TypeId.

This accessor can mutate the map and therefore should not be used in the ThinLTO backends.

Definition at line 1828 of file ModuleSummaryIndex.h.

◆ getOrInsertTypeIdSummary()

TypeIdSummary & llvm::ModuleSummaryIndex::getOrInsertTypeIdSummary ( StringRef  TypeId)
inline

Return an existing or new TypeIdSummary entry for TypeId.

This accessor can mutate the map and therefore should not be used in the ThinLTO backends.

Definition at line 1794 of file ModuleSummaryIndex.h.

References llvm::GlobalValue::getGUID().

Referenced by parseTypeIdSummaryRecord().

◆ getOrInsertValueInfo() [1/3]

ValueInfo llvm::ModuleSummaryIndex::getOrInsertValueInfo ( const GlobalValue GV)
inline

Return a ValueInfo for GV and mark it as belonging to GV.

Definition at line 1628 of file ModuleSummaryIndex.h.

References assert(), and llvm::GlobalValue::getGUID().

◆ getOrInsertValueInfo() [2/3]

ValueInfo llvm::ModuleSummaryIndex::getOrInsertValueInfo ( GlobalValue::GUID  GUID)
inline

Return a ValueInfo for GUID.

Definition at line 1610 of file ModuleSummaryIndex.h.

Referenced by addGlobalValueSummary().

◆ getOrInsertValueInfo() [3/3]

ValueInfo llvm::ModuleSummaryIndex::getOrInsertValueInfo ( GlobalValue::GUID  GUID,
StringRef  Name 
)
inline

Return a ValueInfo for GUID setting value Name.

Definition at line 1620 of file ModuleSummaryIndex.h.

References assert(), and Name.

◆ getRegularLTOModuleName()

static constexpr const char * llvm::ModuleSummaryIndex::getRegularLTOModuleName ( )
inlinestaticconstexpr

Definition at line 1436 of file ModuleSummaryIndex.h.

Referenced by checkCombinedSummaryForTesting().

◆ getStackIdAtIndex()

uint64_t llvm::ModuleSummaryIndex::getStackIdAtIndex ( unsigned  Index) const
inline

Definition at line 1464 of file ModuleSummaryIndex.h.

References assert().

◆ getTypeIdCompatibleVtableSummary()

std::optional< TypeIdCompatibleVtableInfo > llvm::ModuleSummaryIndex::getTypeIdCompatibleVtableSummary ( StringRef  TypeId) const
inline

For the given TypeId, this returns the TypeIdCompatibleVtableMap entry if present in the summary map.

This may be used when importing.

Definition at line 1835 of file ModuleSummaryIndex.h.

References I.

◆ getTypeIdSummary() [1/2]

TypeIdSummary * llvm::ModuleSummaryIndex::getTypeIdSummary ( StringRef  TypeId)
inline

Definition at line 1814 of file ModuleSummaryIndex.h.

References getTypeIdSummary().

◆ getTypeIdSummary() [2/2]

const TypeIdSummary * llvm::ModuleSummaryIndex::getTypeIdSummary ( StringRef  TypeId) const
inline

This returns either a pointer to the type id summary (if present in the summary map) or null (if not present).

This may be used when importing.

Definition at line 1806 of file ModuleSummaryIndex.h.

References llvm::GlobalValue::getGUID().

Referenced by getTypeIdSummary().

◆ getValueInfo() [1/2]

ValueInfo llvm::ModuleSummaryIndex::getValueInfo ( const GlobalValueSummaryMapTy::value_type &  R) const
inline

Return a ValueInfo for the index value_type (convenient when iterating index).

Definition at line 1599 of file ModuleSummaryIndex.h.

Referenced by exportToDot(), findSummaryInModule(), findValueInfoForFunc(), getGlobalValueSummary(), and isGUIDLive().

◆ getValueInfo() [2/2]

ValueInfo llvm::ModuleSummaryIndex::getValueInfo ( GlobalValue::GUID  GUID) const
inline

Return a ValueInfo for GUID if it exists, otherwise return ValueInfo().

Definition at line 1604 of file ModuleSummaryIndex.h.

References I.

◆ hasExportedFunctions()

bool llvm::ModuleSummaryIndex::hasExportedFunctions ( const Module M) const
inline

Check if the given Module has any functions available for exporting in the index.

We consider any module present in the ModulePathStringTable to have exported functions.

Definition at line 1785 of file ModuleSummaryIndex.h.

References llvm::StringMap< ValueTy, AllocatorTy >::count().

Referenced by llvm::FunctionImportGlobalProcessing::FunctionImportGlobalProcessing().

◆ hasParamAccess()

bool llvm::ModuleSummaryIndex::hasParamAccess ( ) const
inline

Definition at line 1590 of file ModuleSummaryIndex.h.

◆ hasSyntheticEntryCounts()

bool llvm::ModuleSummaryIndex::hasSyntheticEntryCounts ( ) const
inline

Definition at line 1568 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ hasUnifiedLTO()

bool llvm::ModuleSummaryIndex::hasUnifiedLTO ( ) const
inline

Definition at line 1584 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ haveGVs()

bool llvm::ModuleSummaryIndex::haveGVs ( ) const
inline

Definition at line 1440 of file ModuleSummaryIndex.h.

◆ isGlobalValueLive()

bool llvm::ModuleSummaryIndex::isGlobalValueLive ( const GlobalValueSummary GVS) const
inline

Definition at line 1592 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::isLive().

Referenced by isGUIDLive(), and propagateAttributes().

◆ isGUIDLive()

bool ModuleSummaryIndex::isGUIDLive ( GlobalValue::GUID  GUID) const

Definition at line 192 of file ModuleSummaryIndex.cpp.

References getValueInfo(), I, and isGlobalValueLive().

◆ isReadOnly()

bool llvm::ModuleSummaryIndex::isReadOnly ( const GlobalVarSummary GVS) const
inline

Definition at line 1561 of file ModuleSummaryIndex.h.

References llvm::GlobalVarSummary::maybeReadOnly().

Referenced by canImportGlobalVar().

◆ isWriteOnly()

bool llvm::ModuleSummaryIndex::isWriteOnly ( const GlobalVarSummary GVS) const
inline

Definition at line 1564 of file ModuleSummaryIndex.h.

References llvm::GlobalVarSummary::maybeWriteOnly().

Referenced by canImportGlobalVar().

◆ modulePaths() [1/2]

StringMap< ModuleHash > & llvm::ModuleSummaryIndex::modulePaths ( )
inline

Table of modules, containing hash and id.

Definition at line 1727 of file ModuleSummaryIndex.h.

◆ modulePaths() [2/2]

const StringMap< ModuleHash > & llvm::ModuleSummaryIndex::modulePaths ( ) const
inline

Table of modules, containing module hash and id.

Definition at line 1722 of file ModuleSummaryIndex.h.

Referenced by exportToDot().

◆ partiallySplitLTOUnits()

bool llvm::ModuleSummaryIndex::partiallySplitLTOUnits ( ) const
inline

Definition at line 1587 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ print()

void ModuleSummaryIndex::print ( raw_ostream OS,
bool  IsForDebug = false 
) const

Print to an output stream.

Definition at line 5222 of file AsmWriter.cpp.

References OS.

Referenced by dump().

◆ propagateAttributes()

void ModuleSummaryIndex::propagateAttributes ( const DenseSet< GlobalValue::GUID > &  PreservedSymbols)

◆ releaseTemporaryMemory()

void llvm::ModuleSummaryIndex::releaseTemporaryMemory ( )
inline

◆ saveString()

StringRef llvm::ModuleSummaryIndex::saveString ( StringRef  String)
inline

Definition at line 1617 of file ModuleSummaryIndex.h.

References llvm::StringSaver::save(), and llvm::String.

◆ setBlockCount()

void llvm::ModuleSummaryIndex::setBlockCount ( uint64_t  C)
inline

Definition at line 1447 of file ModuleSummaryIndex.h.

References llvm::CallingConv::C.

◆ setEnableSplitLTOUnit()

void llvm::ModuleSummaryIndex::setEnableSplitLTOUnit ( )
inline

Definition at line 1582 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setFlags()

void ModuleSummaryIndex::setFlags ( uint64_t  Flags)

◆ setHasSyntheticEntryCounts()

void llvm::ModuleSummaryIndex::setHasSyntheticEntryCounts ( )
inline

Definition at line 1569 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setPartiallySplitLTOUnits()

void llvm::ModuleSummaryIndex::setPartiallySplitLTOUnits ( )
inline

Definition at line 1588 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setSkipModuleByDistributedBackend()

void llvm::ModuleSummaryIndex::setSkipModuleByDistributedBackend ( )
inline

Definition at line 1577 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setUnifiedLTO()

void llvm::ModuleSummaryIndex::setUnifiedLTO ( )
inline

Definition at line 1585 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setWithAttributePropagation()

void llvm::ModuleSummaryIndex::setWithAttributePropagation ( )
inline

Definition at line 1551 of file ModuleSummaryIndex.h.

Referenced by propagateAttributes(), and setFlags().

◆ setWithDSOLocalPropagation()

void llvm::ModuleSummaryIndex::setWithDSOLocalPropagation ( )
inline

Definition at line 1556 of file ModuleSummaryIndex.h.

Referenced by propagateAttributes(), and setFlags().

◆ setWithGlobalValueDeadStripping()

void llvm::ModuleSummaryIndex::setWithGlobalValueDeadStripping ( )
inline

Definition at line 1546 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setWithSupportsHotColdNew()

void llvm::ModuleSummaryIndex::setWithSupportsHotColdNew ( )
inline

Definition at line 1572 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ setWithWholeProgramVisibility()

void llvm::ModuleSummaryIndex::setWithWholeProgramVisibility ( )
inline

Definition at line 1559 of file ModuleSummaryIndex.h.

Referenced by setFlags().

◆ size()

size_t llvm::ModuleSummaryIndex::size ( ) const
inline

Definition at line 1453 of file ModuleSummaryIndex.h.

◆ skipModuleByDistributedBackend()

bool llvm::ModuleSummaryIndex::skipModuleByDistributedBackend ( ) const
inline

Definition at line 1574 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ stackIds()

const std::vector< uint64_t > & llvm::ModuleSummaryIndex::stackIds ( ) const
inline

Definition at line 1455 of file ModuleSummaryIndex.h.

◆ typeIdCompatibleVtableMap()

const auto & llvm::ModuleSummaryIndex::typeIdCompatibleVtableMap ( ) const
inline

Definition at line 1820 of file ModuleSummaryIndex.h.

◆ typeIds()

const TypeIdSummaryMapTy & llvm::ModuleSummaryIndex::typeIds ( ) const
inline

Definition at line 1789 of file ModuleSummaryIndex.h.

◆ withAttributePropagation()

bool llvm::ModuleSummaryIndex::withAttributePropagation ( ) const
inline

Definition at line 1550 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ withDSOLocalPropagation()

bool llvm::ModuleSummaryIndex::withDSOLocalPropagation ( ) const
inline

Definition at line 1555 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ withGlobalValueDeadStripping()

bool llvm::ModuleSummaryIndex::withGlobalValueDeadStripping ( ) const
inline

Definition at line 1543 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ withSupportsHotColdNew()

bool llvm::ModuleSummaryIndex::withSupportsHotColdNew ( ) const
inline

Definition at line 1571 of file ModuleSummaryIndex.h.

Referenced by getFlags().

◆ withWholeProgramVisibility()

bool llvm::ModuleSummaryIndex::withWholeProgramVisibility ( ) const
inline

Definition at line 1558 of file ModuleSummaryIndex.h.

Referenced by getFlags(), and llvm::lto::thinBackend().

Member Data Documentation

◆ BitcodeSummaryVersion

constexpr uint64_t ModuleSummaryIndex::BitcodeSummaryVersion = 9
staticconstexpr

Definition at line 1433 of file ModuleSummaryIndex.h.


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