LLVM  8.0.1
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::GlobalVarSummary Class Reference

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

#include "llvm/IR/ModuleSummaryIndex.h"

Inheritance diagram for llvm::GlobalVarSummary:
Inheritance graph
[legend]
Collaboration diagram for llvm::GlobalVarSummary:
Collaboration graph
[legend]

Classes

struct  GVarFlags
 

Public Member Functions

 GlobalVarSummary (GVFlags Flags, GVarFlags VarFlags, std::vector< ValueInfo > Refs)
 
GVarFlags varflags () const
 
void setReadOnly (bool RO)
 
bool isReadOnly () const
 
- Public Member Functions inherited from llvm::GlobalValueSummary
virtual ~GlobalValueSummary ()=default
 
GlobalValue::GUID getOriginalName () const
 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 () const
 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 isLive () const
 
void setLive (bool Live)
 
void setDSOLocal (bool Local)
 
bool isDSOLocal () const
 
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...
 
GlobalValueSummarygetBaseObject ()
 If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself. More...
 
const GlobalValueSummarygetBaseObject () const
 

Static Public Member Functions

static bool classof (const GlobalValueSummary *GVS)
 Check if this is a global variable summary. More...
 

Public Attributes

struct llvm::GlobalVarSummary::GVarFlags VarFlags
 

Additional Inherited Members

- Public Types inherited from llvm::GlobalValueSummary
enum  SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }
 Sububclass discriminator (for dyn_cast<> et al.) More...
 
- Protected Member Functions inherited from llvm::GlobalValueSummary
 GlobalValueSummary (SummaryKind K, GVFlags Flags, std::vector< ValueInfo > Refs)
 

Detailed Description

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

Global variable summary has extra flag, telling if it is modified during the program run or not. This affects ThinLTO internalization

Definition at line 675 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

◆ GlobalVarSummary()

llvm::GlobalVarSummary::GlobalVarSummary ( GVFlags  Flags,
GVarFlags  VarFlags,
std::vector< ValueInfo Refs 
)
inline

Definition at line 683 of file ModuleSummaryIndex.h.

Member Function Documentation

◆ classof()

static bool llvm::GlobalVarSummary::classof ( const GlobalValueSummary GVS)
inlinestatic

Check if this is a global variable summary.

Definition at line 689 of file ModuleSummaryIndex.h.

References llvm::GlobalValueSummary::getSummaryKind().

◆ isReadOnly()

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

Definition at line 695 of file ModuleSummaryIndex.h.

◆ setReadOnly()

void llvm::GlobalVarSummary::setReadOnly ( bool  RO)
inline

Definition at line 694 of file ModuleSummaryIndex.h.

◆ varflags()

GVarFlags llvm::GlobalVarSummary::varflags ( ) const
inline

Definition at line 693 of file ModuleSummaryIndex.h.

Referenced by writeTypeIdSummaryRecord().

Member Data Documentation

◆ VarFlags

struct llvm::GlobalVarSummary::GVarFlags llvm::GlobalVarSummary::VarFlags

Referenced by getSummaryKindName().


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