LLVM  14.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::ValueInfo Struct Reference

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

#include "llvm/IR/ModuleSummaryIndex.h"

Collaboration diagram for llvm::ValueInfo:
Collaboration graph
[legend]

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
 
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, intRefAndFlags
 

Detailed Description

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

Definition at line 168 of file ModuleSummaryIndex.h.

Member Enumeration Documentation

◆ Flags

Enumerator
HaveGV 
ReadOnly 
WriteOnly 

Definition at line 169 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

Member Function Documentation

◆ canAutoHide()

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().

◆ getAccessSpecifier()

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

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

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

◆ getGUID()

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

Definition at line 181 of file ModuleSummaryIndex.h.

References getRef().

Referenced by llvm::AliasSummary::getAliaseeGUID().

◆ getRef()

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

◆ getSummaryList()

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

◆ getValue()

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

Definition at line 182 of file ModuleSummaryIndex.h.

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

◆ haveGVs()

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

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

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

◆ isReadOnly()

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

◆ isValidAccessSpecifier()

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

◆ isWriteOnly()

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

◆ name()

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

Definition at line 191 of file ModuleSummaryIndex.h.

References getRef(), and haveGVs().

◆ operator bool()

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

Definition at line 179 of file ModuleSummaryIndex.h.

References getRef().

◆ setReadOnly()

void llvm::ValueInfo::setReadOnly ( )
inline

◆ setWriteOnly()

void llvm::ValueInfo::setWriteOnly ( )
inline

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: