struct AvailableValue

Declaration

struct AvailableValue { /* full declaration omitted */ };

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.

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:164

Member Variables

public PointerIntPair<llvm::Value*, 2, llvm::gvn::AvailableValue::ValType> Val
V - The value that is live out of the block.
public unsigned int Offset = 0
Offset - The byte offset in Val that is interesting for the load query.

Method Overview

Methods

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

Description

Emit code at the specified insertion point to adjust the value defined here to the specified type. This handles various coercion cases.

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:233

Parameters

llvm::LoadInst* LI
llvm::Instruction* InsertPt
llvm::GVN& gvn

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

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:179

Parameters

llvm::Value* V
unsigned int Offset = 0

llvm::LoadInst* getCoercedLoadValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:221

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

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:195

Parameters

llvm::LoadInst* LI
unsigned int Offset = 0

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

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:187

Parameters

llvm::MemIntrinsic* MI
unsigned int Offset = 0

llvm::MemIntrinsic* getMemIntrinValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:226

llvm::Value* getSimpleValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:216

static llvm::gvn::AvailableValue getUndef()

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:203

bool isCoercedLoadValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:212

bool isMemIntrinValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:213

bool isSimpleValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:211

bool isUndefValue() const

Declared at: llvm/lib/Transforms/Scalar/GVN.cpp:214