LLVM  4.0.0
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
llvm::GlobalValueSummary Class Reference

Function and variable summary information to aid decisions and implementation of importing. More...

#include <ModuleSummaryIndex.h>

Inheritance diagram for llvm::GlobalValueSummary:
[legend]

Classes

struct  GVFlags
 Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield. More...
 

Public Types

enum  SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }
 Sububclass discriminator (for dyn_cast<> et al.) More...
 

Public Member Functions

virtual ~GlobalValueSummary ()=default
 
GlobalValue::GUID getOriginalName ()
 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 ()
 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 liveRoot () const
 Return true if this global value must be considered a root for live value analysis on the index. More...
 
void setLiveRoot ()
 Flag that this global value must be considered a root for live value analysis on the index. More...
 
void setNotEligibleToImport ()
 Flag that this global value cannot be imported. More...
 
ArrayRef< ValueInforefs () const
 Return the list of values referenced by this global value definition. More...
 

Protected Member Functions

 GlobalValueSummary (SummaryKind K, GVFlags Flags, std::vector< ValueInfo > Refs)
 GlobalValueSummary constructor. More...
 

Detailed Description

Function and variable summary information to aid decisions and implementation of importing.

Definition at line 104 of file ModuleSummaryIndex.h.

Member Enumeration Documentation

Sububclass discriminator (for dyn_cast<> et al.)

Enumerator
AliasKind 
FunctionKind 
GlobalVarKind 

Definition at line 107 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

llvm::GlobalValueSummary::GlobalValueSummary ( SummaryKind  K,
GVFlags  Flags,
std::vector< ValueInfo Refs 
)
inlineprotected

GlobalValueSummary constructor.

Definition at line 164 of file ModuleSummaryIndex.h.

virtual llvm::GlobalValueSummary::~GlobalValueSummary ( )
virtualdefault

Member Function Documentation

GVFlags llvm::GlobalValueSummary::flags ( )
inline

Get the flags for this GlobalValue (see struct GVFlags).

Definition at line 188 of file ModuleSummaryIndex.h.

GlobalValue::GUID llvm::GlobalValueSummary::getOriginalName ( )
inline

Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones.

Definition at line 172 of file ModuleSummaryIndex.h.

SummaryKind llvm::GlobalValueSummary::getSummaryKind ( ) const
inline

Which kind of summary subclass this is.

Definition at line 178 of file ModuleSummaryIndex.h.

Referenced by llvm::AliasSummary::classof(), llvm::FunctionSummary::classof(), and llvm::GlobalVarSummary::classof().

GlobalValue::LinkageTypes llvm::GlobalValueSummary::linkage ( ) const
inline

Return linkage type recorded for this global value.

Definition at line 191 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::Linkage.

bool llvm::GlobalValueSummary::liveRoot ( ) const
inline

Return true if this global value must be considered a root for live value analysis on the index.

Definition at line 206 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::LiveRoot.

StringRef llvm::GlobalValueSummary::modulePath ( ) const
inline

Get the path to the module containing this function.

Definition at line 185 of file ModuleSummaryIndex.h.

bool llvm::GlobalValueSummary::notEligibleToImport ( ) const
inline

Return true if this global value can't be imported.

Definition at line 202 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::NotEligibleToImport.

ArrayRef<ValueInfo> llvm::GlobalValueSummary::refs ( ) const
inline

Return the list of values referenced by this global value definition.

Definition at line 216 of file ModuleSummaryIndex.h.

void llvm::GlobalValueSummary::setLinkage ( GlobalValue::LinkageTypes  Linkage)
inline

Sets the linkage to the value determined by global summary-based optimization.

Will be applied in the ThinLTO backends.

Definition at line 197 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::Linkage.

void llvm::GlobalValueSummary::setLiveRoot ( )
inline

Flag that this global value must be considered a root for live value analysis on the index.

Definition at line 210 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::LiveRoot.

void llvm::GlobalValueSummary::setModulePath ( StringRef  ModPath)
inline

Set the path to the module containing this function, for use in the combined index.

Definition at line 182 of file ModuleSummaryIndex.h.

void llvm::GlobalValueSummary::setNotEligibleToImport ( )
inline

Flag that this global value cannot be imported.

Definition at line 213 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::GVFlags::NotEligibleToImport.

void llvm::GlobalValueSummary::setOriginalName ( GlobalValue::GUID  Name)
inline

Initialize the original name hash in this summary.

Definition at line 175 of file ModuleSummaryIndex.h.


The documentation for this class was generated from the following file: