LLVM
15.0.0git
|
Global variable summary information to aid decisions and implementation of importing. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Classes | |
struct | GVarFlags |
Public Member Functions | |
GlobalVarSummary (GVFlags Flags, GVarFlags VarFlags, std::vector< ValueInfo > Refs) | |
GVarFlags | varflags () const |
void | setReadOnly (bool RO) |
void | setWriteOnly (bool WO) |
bool | maybeReadOnly () const |
bool | maybeWriteOnly () const |
bool | isConstant () const |
void | setVCallVisibility (GlobalObject::VCallVisibility Vis) |
GlobalObject::VCallVisibility | getVCallVisibility () const |
void | setVTableFuncs (VTableFuncList Funcs) |
ArrayRef< VirtFuncOffset > | vTableFuncs () const |
![]() | |
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. More... | |
void | setOriginalName (GlobalValue::GUID Name) |
Initialize the original name hash in this summary. More... | |
SummaryKind | getSummaryKind () const |
Which kind of summary subclass this is. More... | |
void | setModulePath (StringRef ModPath) |
Set the path to the module containing this function, for use in the combined index. More... | |
StringRef | modulePath () const |
Get the path to the module containing this function. More... | |
GVFlags | flags () const |
Get the flags for this GlobalValue (see struct GVFlags). More... | |
GlobalValue::LinkageTypes | linkage () const |
Return linkage type recorded for this global value. More... | |
void | setLinkage (GlobalValue::LinkageTypes Linkage) |
Sets the linkage to the value determined by global summary-based optimization. More... | |
bool | notEligibleToImport () const |
Return true if this global value can't be imported. More... | |
bool | isLive () const |
void | setLive (bool Live) |
void | setDSOLocal (bool Local) |
bool | isDSOLocal () const |
void | setCanAutoHide (bool CanAutoHide) |
bool | canAutoHide () const |
GlobalValue::VisibilityTypes | getVisibility () const |
void | setVisibility (GlobalValue::VisibilityTypes Vis) |
void | setNotEligibleToImport () |
Flag that this global value cannot be imported. More... | |
ArrayRef< ValueInfo > | refs () const |
Return the list of values referenced by this global value definition. More... | |
GlobalValueSummary * | getBaseObject () |
If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself. More... | |
const GlobalValueSummary * | getBaseObject () const |
Static Public Member Functions | |
static bool | classof (const GlobalValueSummary *GVS) |
Check if this is a global variable summary. More... | |
Public Attributes | |
struct llvm::GlobalVarSummary::GVarFlags | VarFlags |
Additional Inherited Members | |
![]() | |
enum | SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind } |
Sububclass discriminator (for dyn_cast<> et al.) More... | |
![]() | |
GlobalValueSummary (SummaryKind K, GVFlags Flags, std::vector< ValueInfo > Refs) | |
Global variable summary information to aid decisions and implementation of importing.
Global variable summary has two extra flag, telling if it is readonly or writeonly. Both readonly and writeonly variables can be optimized in the backed: readonly variables can be const-folded, while writeonly vars can be completely eliminated together with corresponding stores. We let both things happen by means of internalizing such variables after ThinLTO import.
Definition at line 893 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 930 of file ModuleSummaryIndex.h.
|
inlinestatic |
Check if this is a global variable summary.
Definition at line 936 of file ModuleSummaryIndex.h.
References llvm::GlobalValueSummary::getSummaryKind(), and llvm::GlobalValueSummary::GlobalVarKind.
|
inline |
Definition at line 949 of file ModuleSummaryIndex.h.
References VarFlags, and llvm::GlobalVarSummary::GVarFlags::VCallVisibility.
|
inline |
Definition at line 945 of file ModuleSummaryIndex.h.
References llvm::GlobalVarSummary::GVarFlags::Constant, and VarFlags.
|
inline |
Definition at line 943 of file ModuleSummaryIndex.h.
References llvm::GlobalVarSummary::GVarFlags::MaybeReadOnly, and VarFlags.
Referenced by llvm::ModuleSummaryIndex::isReadOnly().
|
inline |
Definition at line 944 of file ModuleSummaryIndex.h.
References llvm::GlobalVarSummary::GVarFlags::MaybeWriteOnly, and VarFlags.
Referenced by llvm::ModuleSummaryIndex::isWriteOnly().
|
inline |
Definition at line 941 of file ModuleSummaryIndex.h.
References llvm::GlobalVarSummary::GVarFlags::MaybeReadOnly, and VarFlags.
|
inline |
Definition at line 946 of file ModuleSummaryIndex.h.
References VarFlags, and llvm::GlobalVarSummary::GVarFlags::VCallVisibility.
|
inline |
Definition at line 953 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 942 of file ModuleSummaryIndex.h.
References llvm::GlobalVarSummary::GVarFlags::MaybeWriteOnly, and VarFlags.
|
inline |
Definition at line 940 of file ModuleSummaryIndex.h.
References VarFlags.
|
inline |
Definition at line 958 of file ModuleSummaryIndex.h.
struct llvm::GlobalVarSummary::GVarFlags llvm::GlobalVarSummary::VarFlags |
Referenced by getVCallVisibility(), isConstant(), maybeReadOnly(), maybeWriteOnly(), setReadOnly(), setVCallVisibility(), setWriteOnly(), and varflags().