LLVM  4.0.0
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:
[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, ValType
Val
 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 124 of file GVN.cpp.

Member Enumeration Documentation

Enumerator
SimpleVal 
LoadVal 
MemIntrin 
UndefVal 

Definition at line 125 of file GVN.cpp.

Member Function Documentation

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

Definition at line 139 of file GVN.cpp.

References Offset, Offset, and Val.

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

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

Definition at line 181 of file GVN.cpp.

References assert().

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

Definition at line 155 of file GVN.cpp.

References Offset, Offset, and Val.

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

Definition at line 186 of file GVN.cpp.

References assert().

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

Definition at line 147 of file GVN.cpp.

References Offset, Offset, and Val.

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

Definition at line 176 of file GVN.cpp.

References assert().

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

Definition at line 163 of file GVN.cpp.

References Offset, and Val.

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

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

Definition at line 172 of file GVN.cpp.

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

Definition at line 173 of file GVN.cpp.

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

Definition at line 171 of file GVN.cpp.

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

Definition at line 174 of file GVN.cpp.

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

Emit code at the specified insertion point to adjust the value defined here to the specified type.

This handles various coercion cases.

Definition at line 1165 of file GVN.cpp.

References assert(), llvm::dbgs(), DEBUG, llvm::UndefValue::get(), llvm::Module::getDataLayout(), GetLoadValueForLoad(), GetMemInstValueForLoad(), llvm::Instruction::getModule(), GetStoreValueForLoad(), llvm::Value::getType(), llvm::SPII::Load, and Offset.

Member Data Documentation

unsigned llvm::gvn::AvailableValue::Offset

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

Definition at line 137 of file GVN.cpp.

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

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

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

Definition at line 134 of file GVN.cpp.

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


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