LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::gvn::AvailableValue Struct Reference

Represents a particular available value that we know how to materialize. More...

Collaboration diagram for llvm::gvn::AvailableValue:
Collaboration graph
[legend]

Public Types

enum  ValType { SimpleVal, LoadVal, MemIntrin, UndefVal }
 

Public Member Functions

bool isSimpleValue () const
 
bool isCoercedLoadValue () const
 
bool isMemIntrinValue () const
 
bool isUndefValue () const
 
ValuegetSimpleValue () const
 
LoadInstgetCoercedLoadValue () const
 
MemIntrinsicgetMemIntrinValue () const
 
ValueMaterializeAdjustedValue (LoadInst *LI, Instruction *InsertPt, GVN &gvn) const
 Emit code at the specified insertion point to adjust the value defined here to the specified type. More...
 

Static Public Member Functions

static AvailableValue get (Value *V, unsigned Offset=0)
 
static AvailableValue getMI (MemIntrinsic *MI, unsigned Offset=0)
 
static AvailableValue getLoad (LoadInst *LI, unsigned Offset=0)
 
static AvailableValue getUndef ()
 

Public Attributes

PointerIntPair< Value *, 2, ValTypeVal
 V - The value that is live out of the block. More...
 
unsigned Offset
 Offset - The byte offset in Val that is interesting for the load query. More...
 

Detailed Description

Represents a particular available value that we know how to materialize.

Materialization of an AvailableValue never fails. An AvailableValue is implicitly associated with a rematerialization point which is the location of the instruction from which it was formed.

Definition at line 162 of file GVN.cpp.

Member Enumeration Documentation

◆ ValType

Enumerator
SimpleVal 
LoadVal 
MemIntrin 
UndefVal 

Definition at line 163 of file GVN.cpp.

Member Function Documentation

◆ get()

static AvailableValue llvm::gvn::AvailableValue::get ( Value V,
unsigned  Offset = 0 
)
inlinestatic

Definition at line 177 of file GVN.cpp.

References Offset, and Val.

Referenced by llvm::gvn::AvailableValueInBlock::get(), and reportMayClobberedLoad().

◆ getCoercedLoadValue()

LoadInst* llvm::gvn::AvailableValue::getCoercedLoadValue ( ) const
inline

◆ getLoad()

static AvailableValue llvm::gvn::AvailableValue::getLoad ( LoadInst LI,
unsigned  Offset = 0 
)
inlinestatic

Definition at line 193 of file GVN.cpp.

References Offset, and Val.

Referenced by reportMayClobberedLoad().

◆ getMemIntrinValue()

MemIntrinsic* llvm::gvn::AvailableValue::getMemIntrinValue ( ) const
inline

◆ getMI()

static AvailableValue llvm::gvn::AvailableValue::getMI ( MemIntrinsic MI,
unsigned  Offset = 0 
)
inlinestatic

Definition at line 185 of file GVN.cpp.

References Offset, and Val.

Referenced by reportMayClobberedLoad().

◆ getSimpleValue()

Value* llvm::gvn::AvailableValue::getSimpleValue ( ) const
inline

◆ getUndef()

static AvailableValue llvm::gvn::AvailableValue::getUndef ( )
inlinestatic

Definition at line 201 of file GVN.cpp.

References Offset, and Val.

Referenced by llvm::gvn::AvailableValueInBlock::getUndef().

◆ isCoercedLoadValue()

bool llvm::gvn::AvailableValue::isCoercedLoadValue ( ) const
inline

◆ isMemIntrinValue()

bool llvm::gvn::AvailableValue::isMemIntrinValue ( ) const
inline

◆ isSimpleValue()

bool llvm::gvn::AvailableValue::isSimpleValue ( ) const
inline

◆ isUndefValue()

bool llvm::gvn::AvailableValue::isUndefValue ( ) const
inline

◆ MaterializeAdjustedValue()

Value * AvailableValue::MaterializeAdjustedValue ( LoadInst LI,
Instruction InsertPt,
GVN gvn 
) const

Member Data Documentation

◆ Offset

unsigned llvm::gvn::AvailableValue::Offset

Offset - The byte offset in Val that is interesting for the load query.

Definition at line 175 of file GVN.cpp.

Referenced by get(), getLoad(), getMI(), and getUndef().

◆ Val

PointerIntPair<Value *, 2, ValType> llvm::gvn::AvailableValue::Val

V - The value that is live out of the block.

Definition at line 172 of file GVN.cpp.

Referenced by get(), getLoad(), getMI(), and getUndef().


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