Function and variable summary information to aid decisions and implementation of importing.

Synopsis

Declared in <llvm/IR/ModuleSummaryIndex.h>

class GlobalValueSummary;

Types

Name

Description

GVFlags

Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield.

Enums

Name

Description

ImportKind

Whether a value should be imported as a definition or a declaration.

SummaryKind

Subclass discriminator (for dyn_cast<> et al.)

Member Functions

Name

Description

~GlobalValueSummary [destructor] [virtual]

Destroy this global value summary.

canAutoHide

Return true if this value can be auto‐hidden.

flags

Get the flags for this GlobalValue (see struct GVFlags).

getBaseObject

getBaseObject overloads

getOriginalName

Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones.

getSummaryKind

Which kind of summary subclass this is.

getVisibility

Return the visibility recorded for this global value.

importType

Return whether this value should be imported as definition or declaration.

isDSOLocal

Return true if this symbol was resolved DSO‐locally.

isLive

Return true if this global value is live.

linkage

Return linkage type recorded for this global value.

modulePath

Get the path to the module containing this function.

noRenameOnPromotion

Return true if promotion must not rename this static global.

notEligibleToImport

Return true if this global value can't be imported.

promote

Promote this local symbol to external linkage and mark it promoted.

refs

Return the list of values referenced by this global value definition.

setCanAutoHide

Set whether this value can be auto‐hidden.

setDSOLocal

Set whether this symbol was resolved DSO‐locally.

setExternalLinkageForTest

Set external linkage for testing without going through promote().

setImportKind

Set whether to import this value as a definition or declaration.

setLinkage

Sets the linkage to the value determined by global summary‐based optimization. Will be applied in the ThinLTO backends.

setLive

Set whether this global value is live.

setModulePath

Set the path to the module containing this function, for use in the combined index.

setNoRenameOnPromotion

Set whether promotion must not rename this static global.

setNotEligibleToImport

Flag that this global value cannot be imported.

setOriginalName

Initialize the original name hash in this summary.

setVisibility

Set the visibility recorded for this global value.

shouldImportAsDecl

Return true if this value should be imported as a declaration.

wasPromoted

Return true if this symbol was promoted from local linkage.

Protected Member Functions

Name

Description

GlobalValueSummary [constructor]

Construct a summary of kind K with the given flags and references.

Friends

Name

Description

llvm::ModuleSummaryIndex

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

Derived Classes

Name

Description

AliasSummary

Alias summary information.

FunctionSummary

Function summary information to aid decisions and implementation of importing.

GlobalVarSummary

Global variable summary information to aid decisions and implementation of importing.

Created with MrDocs