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:177

Member Variables

public llvm::Value* Val
Val - The value that is live out of the block.
public llvm::gvn::AvailableValue::ValType Kind
Kind of the live-out value.
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* Load,
    llvm::Instruction* InsertPt,
    llvm::GVNPass& 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:264

Parameters

llvm::LoadInst* Load
llvm::Instruction* InsertPt
llvm::GVNPass& gvn

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

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

Parameters

llvm::Value* V
unsigned int Offset = 0

llvm::LoadInst* getCoercedLoadValue() const

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

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

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

Parameters

llvm::LoadInst* Load
unsigned int Offset = 0

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

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

Parameters

llvm::MemIntrinsic* MI
unsigned int Offset = 0

llvm::MemIntrinsic* getMemIntrinValue() const

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

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

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

Parameters

llvm::SelectInst* Sel

llvm::SelectInst* getSelectValue() const

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

llvm::Value* getSimpleValue() const

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

static llvm::gvn::AvailableValue getUndef()

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

bool isCoercedLoadValue() const

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

bool isMemIntrinValue() const

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

bool isSelectValue() const

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

bool isSimpleValue() const

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

bool isUndefValue() const

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