LLVM 23.0.0git
llvm::ValueInfo Struct Reference

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 GlobalValuegetValue () const
ArrayRef< std::unique_ptr< GlobalValueSummary > > getSummaryList () const
void verifyLocal () const
bool hasLocal () const
bool hasName () 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
LLVM_ABI GlobalValue::VisibilityTypes getELFVisibility () const
 Returns the most constraining visibility among summaries.
LLVM_ABI bool isDSOLocal (bool WithDSOLocalPropagation=false) const
 Checks if all summaries are DSO local (have the flag set).
LLVM_ABI bool canAutoHide () const
 Checks if all copies are eligible for auto-hiding (have flag set).
LLVM_ABI bool noRenameOnPromotion () const

Public Attributes

PointerIntPair< const GlobalValueSummaryMapTy::value_type *, 3, int > RefAndFlags

Detailed Description

Struct that holds a reference to a particular GUID in a global value summary.

Definition at line 193 of file ModuleSummaryIndex.h.

Member Enumeration Documentation

◆ Flags

Enumerator
HaveGV 
ReadOnly 
WriteOnly 

Definition at line 194 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

◆ ValueInfo() [1/2]

llvm::ValueInfo::ValueInfo ( )
default

◆ ValueInfo() [2/2]

llvm::ValueInfo::ValueInfo ( bool HaveGVs,
const GlobalValueSummaryMapTy::value_type * R )
inline

Definition at line 199 of file ModuleSummaryIndex.h.

References RefAndFlags.

Member Function Documentation

◆ canAutoHide()

bool ValueInfo::canAutoHide ( ) const

Checks if all copies are eligible for auto-hiding (have flag set).

Definition at line 73 of file ModuleSummaryIndex.cpp.

References llvm::all_of(), and getSummaryList().

◆ getAccessSpecifier()

unsigned llvm::ValueInfo::getAccessSpecifier ( ) const
inline

Definition at line 239 of file ModuleSummaryIndex.h.

References assert(), isValidAccessSpecifier(), ReadOnly, RefAndFlags, and WriteOnly.

Referenced by setReadOnly(), and setWriteOnly().

◆ getELFVisibility()

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 48 of file ModuleSummaryIndex.cpp.

References llvm::GlobalValue::DefaultVisibility, getSummaryList(), llvm::GlobalValue::HiddenVisibility, llvm::make_pointee_range(), and llvm::GlobalValue::ProtectedVisibility.

◆ getGUID()

GlobalValue::GUID llvm::ValueInfo::getGUID ( ) const
inline

Definition at line 206 of file ModuleSummaryIndex.h.

References getRef().

◆ getRef()

const GlobalValueSummaryMapTy::value_type * llvm::ValueInfo::getRef ( ) const
inline

Definition at line 258 of file ModuleSummaryIndex.h.

References RefAndFlags.

Referenced by getGUID(), getSummaryList(), getValue(), hasLocal(), name(), operator bool(), and verifyLocal().

◆ getSummaryList()

ArrayRef< std::unique_ptr< GlobalValueSummary > > llvm::ValueInfo::getSummaryList ( ) const
inline

◆ getValue()

const GlobalValue * llvm::ValueInfo::getValue ( ) const
inline

Definition at line 207 of file ModuleSummaryIndex.h.

References assert(), getRef(), and haveGVs().

Referenced by hasName().

◆ hasLocal()

bool llvm::ValueInfo::hasLocal ( ) const
inline

Definition at line 218 of file ModuleSummaryIndex.h.

References getRef().

◆ hasName()

bool llvm::ValueInfo::hasName ( ) const
inline

Definition at line 222 of file ModuleSummaryIndex.h.

References getValue(), and haveGVs().

◆ haveGVs()

bool llvm::ValueInfo::haveGVs ( ) const
inline

Definition at line 230 of file ModuleSummaryIndex.h.

References HaveGV, and RefAndFlags.

Referenced by getValue(), hasName(), and name().

◆ isDSOLocal()

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 60 of file ModuleSummaryIndex.cpp.

References llvm::all_of(), and getSummaryList().

◆ isReadOnly()

bool llvm::ValueInfo::isReadOnly ( ) const
inline

Definition at line 231 of file ModuleSummaryIndex.h.

References assert(), isValidAccessSpecifier(), ReadOnly, and RefAndFlags.

Referenced by resolveFwdRef().

◆ isValidAccessSpecifier()

bool llvm::ValueInfo::isValidAccessSpecifier ( ) const
inline

Definition at line 243 of file ModuleSummaryIndex.h.

References ReadOnly, RefAndFlags, and WriteOnly.

Referenced by getAccessSpecifier(), isReadOnly(), and isWriteOnly().

◆ isWriteOnly()

bool llvm::ValueInfo::isWriteOnly ( ) const
inline

Definition at line 235 of file ModuleSummaryIndex.h.

References assert(), isValidAccessSpecifier(), RefAndFlags, and WriteOnly.

Referenced by resolveFwdRef().

◆ name()

StringRef llvm::ValueInfo::name ( ) const
inline

Definition at line 224 of file ModuleSummaryIndex.h.

References assert(), getRef(), and haveGVs().

◆ noRenameOnPromotion()

LLVM_ABI bool llvm::ValueInfo::noRenameOnPromotion ( ) const

References LLVM_ABI.

◆ operator bool()

llvm::ValueInfo::operator bool ( ) const
inlineexplicit

Definition at line 204 of file ModuleSummaryIndex.h.

References getRef().

◆ setReadOnly()

void llvm::ValueInfo::setReadOnly ( )
inline

Definition at line 247 of file ModuleSummaryIndex.h.

References assert(), getAccessSpecifier(), ReadOnly, and RefAndFlags.

Referenced by resolveFwdRef().

◆ setWriteOnly()

void llvm::ValueInfo::setWriteOnly ( )
inline

Definition at line 253 of file ModuleSummaryIndex.h.

References assert(), getAccessSpecifier(), RefAndFlags, and WriteOnly.

Referenced by resolveFwdRef().

◆ verifyLocal()

void llvm::ValueInfo::verifyLocal ( ) const
inline

Definition at line 216 of file ModuleSummaryIndex.h.

References getRef().

Member Data Documentation

◆ RefAndFlags

PointerIntPair<const GlobalValueSummaryMapTy::value_type *, 3, int> llvm::ValueInfo::RefAndFlags

The documentation for this struct was generated from the following files: