LLVM
13.0.0git
|
Struct that holds a reference to a particular GUID in a global value summary. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Public Types | |
enum | Flags { HaveGV = 1, ReadOnly = 2, WriteOnly = 4 } |
Public Member Functions | |
ValueInfo ()=default | |
ValueInfo (bool HaveGVs, const GlobalValueSummaryMapTy::value_type *R) | |
operator bool () const | |
GlobalValue::GUID | getGUID () const |
const GlobalValue * | getValue () const |
ArrayRef< std::unique_ptr< GlobalValueSummary > > | getSummaryList () const |
StringRef | name () const |
bool | haveGVs () const |
bool | isReadOnly () const |
bool | isWriteOnly () const |
unsigned | getAccessSpecifier () const |
bool | isValidAccessSpecifier () const |
void | setReadOnly () |
void | setWriteOnly () |
const GlobalValueSummaryMapTy::value_type * | getRef () const |
GlobalValue::VisibilityTypes | getELFVisibility () const |
Returns the most constraining visibility among summaries. More... | |
bool | isDSOLocal (bool WithDSOLocalPropagation=false) const |
Checks if all summaries are DSO local (have the flag set). More... | |
bool | canAutoHide () const |
Checks if all copies are eligible for auto-hiding (have flag set). More... | |
Public Attributes | |
PointerIntPair< const GlobalValueSummaryMapTy::value_type *, 3, int > | RefAndFlags |
Struct that holds a reference to a particular GUID in a global value summary.
Definition at line 166 of file ModuleSummaryIndex.h.
Enumerator | |
---|---|
HaveGV | |
ReadOnly | |
WriteOnly |
Definition at line 167 of file ModuleSummaryIndex.h.
|
default |
|
inline |
Definition at line 172 of file ModuleSummaryIndex.h.
References RefAndFlags, llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::setInt(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::setPointer().
bool ValueInfo::canAutoHide | ( | ) | const |
Checks if all copies are eligible for auto-hiding (have flag set).
Definition at line 68 of file ModuleSummaryIndex.cpp.
References llvm::all_of(), and getSummaryList().
|
inline |
Definition at line 203 of file ModuleSummaryIndex.h.
References assert(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), isValidAccessSpecifier(), ReadOnly, RefAndFlags, and WriteOnly.
Referenced by setReadOnly(), and setWriteOnly().
GlobalValue::VisibilityTypes ValueInfo::getELFVisibility | ( | ) | const |
Returns the most constraining visibility among summaries.
The visibilities, ordered from least to most constraining, are: default, protected and hidden.
Definition at line 43 of file ModuleSummaryIndex.cpp.
References llvm::GlobalValue::DefaultVisibility, getSummaryList(), llvm::GlobalValue::HiddenVisibility, llvm::make_pointee_range(), llvm::GlobalValue::ProtectedVisibility, and S.
|
inline |
Definition at line 179 of file ModuleSummaryIndex.h.
References getRef().
Referenced by llvm::AliasSummary::getAliaseeGUID().
|
inline |
Definition at line 222 of file ModuleSummaryIndex.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), and RefAndFlags.
Referenced by getGUID(), getSummaryList(), getValue(), llvm::DenseMapInfo< ValueInfo >::isEqual(), name(), and operator bool().
|
inline |
Definition at line 185 of file ModuleSummaryIndex.h.
References getRef().
Referenced by canAutoHide(), llvm::computeSyntheticCounts(), llvm::ModuleSummaryIndex::discoverNodes(), getELFVisibility(), llvm::AliasSummary::hasAliasee(), and isDSOLocal().
|
inline |
Definition at line 180 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 194 of file ModuleSummaryIndex.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), HaveGV, and RefAndFlags.
Referenced by getValue(), llvm::DenseMapInfo< ValueInfo >::isEqual(), and name().
bool ValueInfo::isDSOLocal | ( | bool | WithDSOLocalPropagation = false | ) | const |
Checks if all summaries are DSO local (have the flag set).
When DSOLocal propagation has been done, set the parameter to enable fast check.
Definition at line 55 of file ModuleSummaryIndex.cpp.
References llvm::all_of(), and getSummaryList().
|
inline |
Definition at line 195 of file ModuleSummaryIndex.h.
References assert(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), isValidAccessSpecifier(), ReadOnly, and RefAndFlags.
Referenced by resolveFwdRef().
|
inline |
Definition at line 207 of file ModuleSummaryIndex.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), ReadOnly, RefAndFlags, and WriteOnly.
Referenced by getAccessSpecifier(), isReadOnly(), and isWriteOnly().
|
inline |
Definition at line 199 of file ModuleSummaryIndex.h.
References assert(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), isValidAccessSpecifier(), RefAndFlags, and WriteOnly.
Referenced by resolveFwdRef().
|
inline |
Definition at line 189 of file ModuleSummaryIndex.h.
|
inlineexplicit |
Definition at line 177 of file ModuleSummaryIndex.h.
References getRef().
|
inline |
Definition at line 211 of file ModuleSummaryIndex.h.
References assert(), getAccessSpecifier(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), ReadOnly, RefAndFlags, and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::setInt().
Referenced by resolveFwdRef().
|
inline |
Definition at line 217 of file ModuleSummaryIndex.h.
References assert(), getAccessSpecifier(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt(), RefAndFlags, llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::setInt(), and WriteOnly.
Referenced by resolveFwdRef().
PointerIntPair<const GlobalValueSummaryMapTy::value_type *, 3, int> llvm::ValueInfo::RefAndFlags |
Definition at line 169 of file ModuleSummaryIndex.h.
Referenced by getAccessSpecifier(), getRef(), haveGVs(), isReadOnly(), isValidAccessSpecifier(), isWriteOnly(), setReadOnly(), setWriteOnly(), and ValueInfo().