LLVM  15.0.0git
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 {
  ValType::SimpleVal, ValType::LoadVal, ValType::MemIntrin, ValType::UndefVal,
  ValType::SelectVal
}
 

Public Member Functions

bool isSimpleValue () const
 
bool isCoercedLoadValue () const
 
bool isMemIntrinValue () const
 
bool isUndefValue () const
 
bool isSelectValue () const
 
ValuegetSimpleValue () const
 
LoadInstgetCoercedLoadValue () const
 
MemIntrinsicgetMemIntrinValue () const
 
SelectInstgetSelectValue () const
 
ValueMaterializeAdjustedValue (LoadInst *Load, Instruction *InsertPt, GVNPass &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 *Load, unsigned Offset=0)
 
static AvailableValue getUndef ()
 
static AvailableValue getSelect (SelectInst *Sel)
 

Public Attributes

ValueVal
 Val - The value that is live out of the block. More...
 
ValType Kind
 Kind of the live-out value. More...
 
unsigned Offset = 0
 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 177 of file GVN.cpp.

Member Enumeration Documentation

◆ ValType

Enumerator
SimpleVal 
LoadVal 
MemIntrin 
UndefVal 
SelectVal 

Definition at line 178 of file GVN.cpp.

Member Function Documentation

◆ get()

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

Definition at line 196 of file GVN.cpp.

References Kind, Offset, and Val.

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

◆ getCoercedLoadValue()

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

Definition at line 247 of file GVN.cpp.

References assert().

◆ getLoad()

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

Definition at line 212 of file GVN.cpp.

References Kind, llvm::SPII::Load, Offset, and Val.

◆ getMemIntrinValue()

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

Definition at line 252 of file GVN.cpp.

References assert().

◆ getMI()

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

Definition at line 204 of file GVN.cpp.

References Kind, MI, Offset, and Val.

◆ getSelect()

static AvailableValue llvm::gvn::AvailableValue::getSelect ( SelectInst Sel)
inlinestatic

Definition at line 228 of file GVN.cpp.

References Kind, Offset, and Val.

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

◆ getSelectValue()

SelectInst* llvm::gvn::AvailableValue::getSelectValue ( ) const
inline

Definition at line 257 of file GVN.cpp.

References assert().

◆ getSimpleValue()

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

Definition at line 242 of file GVN.cpp.

References assert().

◆ getUndef()

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

Definition at line 220 of file GVN.cpp.

References Kind, Offset, and Val.

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

◆ isCoercedLoadValue()

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

Definition at line 237 of file GVN.cpp.

◆ isMemIntrinValue()

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

Definition at line 238 of file GVN.cpp.

◆ isSelectValue()

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

Definition at line 240 of file GVN.cpp.

◆ isSimpleValue()

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

Definition at line 236 of file GVN.cpp.

◆ isUndefValue()

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

Definition at line 239 of file GVN.cpp.

◆ MaterializeAdjustedValue()

Value * AvailableValue::MaterializeAdjustedValue ( LoadInst Load,
Instruction InsertPt,
GVNPass gvn 
) const

Member Data Documentation

◆ Kind

ValType llvm::gvn::AvailableValue::Kind

Kind of the live-out value.

Definition at line 191 of file GVN.cpp.

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

◆ Offset

unsigned llvm::gvn::AvailableValue::Offset = 0

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

Definition at line 194 of file GVN.cpp.

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

◆ Val

Value* llvm::gvn::AvailableValue::Val

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

Definition at line 189 of file GVN.cpp.

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


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