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

Synopsis

Declared in <llvm/IR/ModuleSummaryIndex.h>

class ModuleSummaryIndex;

Type Aliases

Name

Description

ModuleInfo

Module path string table entry type (path mapped to module hash).

Member Functions

Name

Description

ModuleSummaryIndex [constructor]

Construct a module summary index.

addBlockCount

Add C to the total basic‐block count.

addGlobalValueSummary

addGlobalValueSummary overloads

addModule

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

addOrGetStackIdIndex

Return the index of StackId, inserting it if it is not yet present.

addOriginalName

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

begin

begin overloads

calculateCallGraphRoot

Calculate a dummy FunctionSummary that edges to all call‐graph roots.

canImportGlobalVar

canImportGlobalVar overloads

cfiFunctionDecls

cfiFunctionDecls overloads

cfiFunctionDefs

cfiFunctionDefs overloads

collectDefinedFunctionsForModule

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

collectDefinedGVSummariesPerModule

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

dump

Dump to stderr (for debugging).

dumpSCCs

Print out strongly connected components for debugging.

enableSplitLTOUnit

Return true if the index was created with ‐fsplit‐lto‐unit.

end

end overloads

exportToDot

Export summary to dot file for GraphViz.

findSummaryInModule

findSummaryInModule overloads

getBlockCount

Return the total basic‐block count recorded in this index.

getFlags

Return the combined bitcode flags for this index.

getGUIDFromOriginalID

Return the GUID for OriginalId in the OidGuidMap.

getGlobalValueSummary

getGlobalValueSummary overloads

getModule

Return module entry for module with the given ModPath.

getModuleHash

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

getOrInsertTypeIdCompatibleVtableSummary

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.

getOrInsertTypeIdSummary

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.

getOrInsertValueInfo

getOrInsertValueInfo overloads

getStackIdAtIndex

Return the full stack id stored at Index in the StackIds vector.

getTypeIdCompatibleVtableSummary

For the given TypeId, this returns the TypeIdCompatibleVtableMap entry if present in the summary map. This may be used when importing.

getTypeIdSummary

getTypeIdSummary overloads

getValueInfo

getValueInfo overloads

hasExportedFunctions

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

hasParamAccess

Return true if any FunctionSummary in the index has ParamAccess data.

hasUnifiedLTO

Return true if the index was created with ‐funified‐lto.

haveGVs

Return true if this index stores GlobalValue pointers in summaries.

isGUIDLive

Return true if any summary for GUID is live.

isGlobalValueLive

Return true if GVS is live given whether dead stripping has run.

isReadOnly

Return true if GVS is known read‐only after attribute propagation.

isWriteOnly

Return true if GVS is known write‐only after attribute propagation.

modulePaths

modulePaths overloads

partiallySplitLTOUnits

Return true if some modules were split LTO units and some were not.

print

Print to an output stream.

propagateAttributes

Do the access attribute and DSOLocal propagation in combined index.

releaseTemporaryMemory

Release memory used only while constructing the index.

saveString

Save a string in the Index for use as a value name.

setBlockCount

Set the total basic‐block count to C.

setEnableSplitLTOUnit

Mark that the index was created with ‐fsplit‐lto‐unit.

setFlags

Set the combined bitcode flags for this index.

setPartiallySplitLTOUnits

Mark that the combined index mixes split and non‐split LTO units.

setSkipModuleByDistributedBackend

Mark that the distributed backend should skip compiling this module.

setUnifiedLTO

Mark that the index was created with ‐funified‐lto.

setWithAttributePropagation

Mark that summary‐based attribute propagation has run.

setWithDSOLocalPropagation

Mark that summary‐based DSOLocal propagation has run.

setWithGlobalValueDeadStripping

Mark that summary‐based GlobalValue dead stripping has run.

setWithInternalizeAndPromote

Mark that summary‐based internalization and promotion has run.

setWithSupportsHotColdNew

Mark that linking used an allocator that supports hot/cold new.

setWithWholeProgramVisibility

Mark that whole‐program visibility is available.

size

Return the number of GUID entries in the global value summary map.

skipModuleByDistributedBackend

Return true if the distributed backend should skip this module.

sortedGlobalValueSummariesRange

Return an owning range over global value summaries sorted by GUID.

stackIds

Return the list of unique stack ids recorded in this index.

typeIdCompatibleVtableMap

Return the map from type identifiers to compatible vtable summaries.

typeIds

Return the map from type identifier GUIDs to type id summaries.

withAttributePropagation

Return true if summary‐based attribute propagation has run.

withDSOLocalPropagation

Return true if summary‐based DSOLocal propagation has run.

withGlobalValueDeadStripping

Return true if summary‐based GlobalValue dead stripping has run.

withInternalizeAndPromote

Return true if summary‐based internalization and promotion has run.

withSupportsHotColdNew

Return true if linking used an allocator that supports hot/cold new.

withWholeProgramVisibility

Return true if whole‐program visibility is available.

Static Member Functions

Name

Description

discoverNodes

Convenience function for doing a DFS on a ValueInfo. Marks the function in the FunctionHasParent map.

getGlobalNameForLocal

getGlobalNameForLocal overloads

getOriginalNameBeforePromote

Return the unpromoted name for a global value, if it was promoted.

getRegularLTOModuleName

Return the conventional module name used for Regular LTO in ASM output.

Static Data Members

Name

Description

BitcodeSummaryVersion

Current version for the module summary in bitcode files.

Friends

Name

Description

llvm::yaml::MappingTraits

This class should be specialized by any type that needs to be converted to/from a YAML mapping. For example:

llvm::yaml::MappingTraits<ModuleSummaryIndex>

YAMLIO mapping traits for ModuleSummaryIndex.

Non-Member Functions

Name

Description

ComputeCrossModuleImport

Compute all the imports and exports for every module in the Index.

buildModuleSummaryIndex

Direct function to compute a ModuleSummaryIndex from a given module.

computeDeadSymbolsAndUpdateIndirectCalls

Compute dead symbols in the summary index and update SamplePGO edges.

computeDeadSymbolsWithConstProp

Compute dead symbols and run constant propagation in combined index after that.

createImmutableModuleSummaryIndexWrapperPass

Create a legacy immutable pass that wraps a provided ModuleSummaryIndex.

generateParamAccessSummary

Generate parameter access summary information in Index.

getVisibleToRegularObjVtableGUIDs

Collect GUIDs of vtables visible to regular object files.

parseSummaryIndexAssembly

Parse LLVM Assembly for summary index from a MemoryBuffer.

parseSummaryIndexAssemblyFile

Parse a module summary index from an LLVM Assembly file.

parseSummaryIndexAssemblyString

Parse a module summary index from an LLVM Assembly string.

runWholeProgramDevirtOnIndex

Perform index‐based whole‐program devirtualization on Summary.

thinLTOInternalizeAndPromoteInIndex

Mark exported values external and non‐exported values internal in the index.

thinLTOPropagateFunctionAttrs

Propagate function attributes for function summaries along the index's callgraph during thinlink

updateIndexWPDForExports

Update recorded single‐impl WPD target names after cross‐module importing.

updateIndirectCalls

Update SamplePGO indirect call edges to local functions when needed.

updateVCallVisibilityInIndex

Update virtual‐call visibility in the module summary index.

writeIndexToFile

Write a module summary index to Out as a new bitcode block.

Created with MrDocs