LLVM
15.0.0git
|
Represents a particular available value that we know how to materialize. More...
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 |
Value * | getSimpleValue () const |
LoadInst * | getCoercedLoadValue () const |
MemIntrinsic * | getMemIntrinValue () const |
SelectInst * | getSelectValue () const |
Value * | MaterializeAdjustedValue (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 | |
Value * | Val |
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... | |
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.
|
strong |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Value * AvailableValue::MaterializeAdjustedValue | ( | LoadInst * | Load, |
Instruction * | InsertPt, | ||
GVNPass & | 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 965 of file GVN.cpp.
References assert(), llvm::SelectInst::Create(), llvm::dbgs(), DL, findDominatingLoad(), llvm::SelectInst::getCondition(), llvm::GVNPass::getDominatorTree(), llvm::VNCoercion::getLoadValueForLoad(), llvm::GVNPass::getMemDep(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::User::getOperand(), llvm::VNCoercion::getStoreValueForLoad(), llvm::Value::getType(), L2, LLVM_DEBUG, llvm_unreachable, llvm::SPII::Load, and llvm::MemoryDependenceResults::removeInstruction().
Referenced by llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue().
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().
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().
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().