LLVM  10.0.0
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:
[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 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
 
bool isDSOLocal () const
 
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
 

Detailed Description

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

Definition at line 165 of file ModuleSummaryIndex.h.

Member Enumeration Documentation

◆ Flags

Enumerator
HaveGV 
ReadOnly 
WriteOnly 

Definition at line 166 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 171 of file ModuleSummaryIndex.h.

Member Function Documentation

◆ canAutoHide()

bool ValueInfo::canAutoHide ( ) const

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

Definition at line 46 of file ModuleSummaryIndex.cpp.

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

Referenced by thinLTOResolvePrevailingGUID().

◆ getAccessSpecifier()

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

Definition at line 202 of file ModuleSummaryIndex.h.

References assert().

◆ getGUID()

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

◆ 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 179 of file ModuleSummaryIndex.h.

References assert().

◆ haveGVs()

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

Definition at line 193 of file ModuleSummaryIndex.h.

Referenced by llvm::DenseMapInfo< ValueInfo >::isEqual().

◆ isDSOLocal()

bool ValueInfo::isDSOLocal ( ) const

Definition at line 37 of file ModuleSummaryIndex.cpp.

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

◆ isReadOnly()

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

Definition at line 194 of file ModuleSummaryIndex.h.

References assert().

Referenced by llvm::ModuleSummaryIndex::canImportGlobalVar(), and resolveFwdRef().

◆ isValidAccessSpecifier()

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

Definition at line 206 of file ModuleSummaryIndex.h.

◆ isWriteOnly()

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

Definition at line 198 of file ModuleSummaryIndex.h.

References assert().

Referenced by llvm::ModuleSummaryIndex::canImportGlobalVar(), and resolveFwdRef().

◆ name()

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

◆ operator bool()

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

Definition at line 176 of file ModuleSummaryIndex.h.

◆ setReadOnly()

void llvm::ValueInfo::setReadOnly ( )
inline

Definition at line 210 of file ModuleSummaryIndex.h.

References assert().

Referenced by resolveFwdRef().

◆ setWriteOnly()

void llvm::ValueInfo::setWriteOnly ( )
inline

Definition at line 216 of file ModuleSummaryIndex.h.

References assert().

Referenced by resolveFwdRef().

Member Data Documentation

◆ RefAndFlags

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

Definition at line 168 of file ModuleSummaryIndex.h.


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