|
LLVM 22.0.0git
|
Function and variable summary information to aid decisions and implementation of importing. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Classes | |
| struct | GVFlags |
| Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield. More... | |
Public Types | |
| enum | SummaryKind : unsigned { AliasKind , FunctionKind , GlobalVarKind } |
| Sububclass discriminator (for dyn_cast<> et al.) More... | |
| enum | ImportKind : unsigned { Definition = 0 , Declaration = 1 } |
Public Member Functions | |
| virtual | ~GlobalValueSummary ()=default |
| GlobalValue::GUID | getOriginalName () const |
| Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones. | |
| void | setOriginalName (GlobalValue::GUID Name) |
| Initialize the original name hash in this summary. | |
| SummaryKind | getSummaryKind () const |
| Which kind of summary subclass this is. | |
| void | setModulePath (StringRef ModPath) |
| Set the path to the module containing this function, for use in the combined index. | |
| StringRef | modulePath () const |
| Get the path to the module containing this function. | |
| GVFlags | flags () const |
Get the flags for this GlobalValue (see struct GVFlags). | |
| GlobalValue::LinkageTypes | linkage () const |
| Return linkage type recorded for this global value. | |
| void | setLinkage (GlobalValue::LinkageTypes Linkage) |
| Sets the linkage to the value determined by global summary-based optimization. | |
| bool | notEligibleToImport () const |
| Return true if this global value can't be imported. | |
| bool | isLive () const |
| void | setLive (bool Live) |
| void | setDSOLocal (bool Local) |
| bool | isDSOLocal () const |
| void | setCanAutoHide (bool CanAutoHide) |
| bool | canAutoHide () const |
| bool | shouldImportAsDecl () const |
| void | setImportKind (ImportKind IK) |
| GlobalValueSummary::ImportKind | importType () const |
| GlobalValue::VisibilityTypes | getVisibility () const |
| void | setVisibility (GlobalValue::VisibilityTypes Vis) |
| void | setNotEligibleToImport () |
| Flag that this global value cannot be imported. | |
| ArrayRef< ValueInfo > | refs () const |
| Return the list of values referenced by this global value definition. | |
| GlobalValueSummary * | getBaseObject () |
| If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself. | |
| const GlobalValueSummary * | getBaseObject () const |
Protected Member Functions | |
| GlobalValueSummary (SummaryKind K, GVFlags Flags, SmallVectorImpl< ValueInfo > &&Refs) | |
Friends | |
| class | ModuleSummaryIndex |
Function and variable summary information to aid decisions and implementation of importing.
Definition at line 488 of file ModuleSummaryIndex.h.
| Enumerator | |
|---|---|
| Definition | |
| Declaration | |
Definition at line 493 of file ModuleSummaryIndex.h.
Sububclass discriminator (for dyn_cast<> et al.)
| Enumerator | |
|---|---|
| AliasKind | |
| FunctionKind | |
| GlobalVarKind | |
Definition at line 491 of file ModuleSummaryIndex.h.
|
inlineprotected |
Definition at line 589 of file ModuleSummaryIndex.h.
References AliasKind, assert(), and llvm::move().
Referenced by llvm::AliasSummary::AliasSummary(), llvm::AliasSummary::classof(), llvm::FunctionSummary::classof(), llvm::GlobalVarSummary::classof(), llvm::FunctionSummary::FunctionSummary(), llvm::AliasSummary::getAliasee(), llvm::AliasSummary::getAliasee(), getBaseObject(), getBaseObject(), llvm::GlobalVarSummary::GlobalVarSummary(), and llvm::AliasSummary::setAliasee().
|
virtualdefault |
|
inline |
Definition at line 643 of file ModuleSummaryIndex.h.
|
inline |
Get the flags for this GlobalValue (see struct GVFlags).
Definition at line 617 of file ModuleSummaryIndex.h.
|
inline |
If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself.
Definition at line 750 of file ModuleSummaryIndex.h.
References llvm::dyn_cast(), and GlobalValueSummary().
Referenced by llvm::ModuleSummaryIndex::canImportGlobalVar().
|
inline |
Definition at line 744 of file ModuleSummaryIndex.h.
References llvm::dyn_cast(), and GlobalValueSummary().
|
inline |
Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones.
Definition at line 601 of file ModuleSummaryIndex.h.
|
inline |
Which kind of summary subclass this is.
Definition at line 607 of file ModuleSummaryIndex.h.
Referenced by llvm::AliasSummary::classof(), llvm::FunctionSummary::classof(), and llvm::GlobalVarSummary::classof().
|
inline |
Definition at line 655 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 651 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 639 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 633 of file ModuleSummaryIndex.h.
Referenced by llvm::ModuleSummaryIndex::isGlobalValueLive().
|
inline |
Return linkage type recorded for this global value.
Definition at line 620 of file ModuleSummaryIndex.h.
Referenced by llvm::ModuleSummaryIndex::canImportGlobalVar(), llvm::JITSymbolFlags::fromSummary(), getNodeLabel(), and shouldSkipLocalInAnotherModule().
|
inline |
Get the path to the module containing this function.
Definition at line 614 of file ModuleSummaryIndex.h.
Referenced by shouldSkipLocalInAnotherModule().
|
inline |
Return true if this global value can't be imported.
Definition at line 631 of file ModuleSummaryIndex.h.
Referenced by llvm::ModuleSummaryIndex::canImportGlobalVar().
Return the list of values referenced by this global value definition.
Definition at line 666 of file ModuleSummaryIndex.h.
Referenced by propagateAttributesToRefs(), and llvm::FunctionSummary::specialRefCounts().
|
inline |
Definition at line 641 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 637 of file ModuleSummaryIndex.h.
References Local.
|
inline |
Definition at line 649 of file ModuleSummaryIndex.h.
|
inline |
Sets the linkage to the value determined by global summary-based optimization.
Will be applied in the ThinLTO backends.
Definition at line 626 of file ModuleSummaryIndex.h.
References Linkage.
|
inline |
Definition at line 635 of file ModuleSummaryIndex.h.
|
inline |
Set the path to the module containing this function, for use in the combined index.
Definition at line 611 of file ModuleSummaryIndex.h.
|
inline |
Flag that this global value cannot be imported.
Definition at line 663 of file ModuleSummaryIndex.h.
|
inline |
Initialize the original name hash in this summary.
Definition at line 604 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 658 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 645 of file ModuleSummaryIndex.h.
References Declaration.
|
friend |
Definition at line 673 of file ModuleSummaryIndex.h.
References ModuleSummaryIndex.
Referenced by ModuleSummaryIndex.