class SDValue

Declaration

class SDValue { /* full declaration omitted */ };

Description

Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation. Many nodes return multiple values, from loads (which define a token and a return value) to ADDC (which returns a result and a carry value), to calls (which may return an arbitrary number of values). As such, each use of a SelectionDAG computation must indicate the node that computes it as well as which return value to use from that node. This pair of information is represented with the SDValue value type.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:138

Member Variables

private llvm::SDNode* Node = nullptr
private unsigned int ResNo = 0

Method Overview

Methods

SDValue(llvm::SDNode* node, unsigned int resno)

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:146

Parameters

llvm::SDNode* node
unsigned int resno

SDValue()

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:145

inline void dump(
    const llvm::SelectionDAG* G) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:213

Parameters

const llvm::SelectionDAG* G

inline void dump() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:212

inline void dumpr(
    const llvm::SelectionDAG* G) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:215

Parameters

const llvm::SelectionDAG* G

inline void dumpr() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:214

inline const llvm::APInt& getConstantOperandAPInt(
    unsigned int i) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:205

Parameters

unsigned int i

inline uint64_t getConstantOperandVal(
    unsigned int i) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:204

Parameters

unsigned int i

inline const llvm::DebugLoc& getDebugLoc() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:211

inline unsigned int getMachineOpcode() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:210

llvm::SDNode* getNode() const

Description

get the SDNode which holds the desired result

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:152

inline unsigned int getNumOperands() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:202

inline unsigned int getOpcode() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:201

inline const llvm::SDValue& getOperand(
    unsigned int i) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:203

Parameters

unsigned int i

unsigned int getResNo() const

Description

get the index which selects a specific result in the SDNode

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:149

uint64_t getScalarValueSizeInBits() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:196

llvm::MVT getSimpleValueType() const

Description

Return the simple ValueType of the referenced return value.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:183

llvm::SDValue getValue(unsigned int R) const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:172

Parameters

unsigned int R

llvm::TypeSize getValueSizeInBits() const

Description

Returns the size of the value in bits. If the value type is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:192

inline llvm::EVT getValueType() const

Description

Return the ValueType of the referenced return value.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:180

inline bool hasOneUse() const

Description

Return true if there is exactly one node using value ResNo of Node.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:229

inline bool isMachineOpcode() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:208

bool isOperandOf(const llvm::SDNode* N) const

Description

Return true if this node is an operand of N.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:177

Parameters

const llvm::SDNode* N

inline bool isTargetMemoryOpcode() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:206

inline bool isTargetOpcode() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:207

inline bool isUndef() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:209

bool operator bool() const

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:168

bool reachesChainWithoutSideEffects(
    llvm::SDValue Dest,
    unsigned int Depth = 2) const

Description

Return true if this operand (which must be a chain) reaches the specified operand without crossing any side-effecting instructions. In practice, this looks through token factors and non-volatile loads. In order to remain efficient, this only looks a couple of nodes in, it does not do an exhaustive search.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:222

Parameters

llvm::SDValue Dest
unsigned int Depth = 2

void setNode(llvm::SDNode* N)

Description

set the SDNode

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:155

Parameters

llvm::SDNode* N

inline bool use_empty() const

Description

Return true if there are no nodes using value ResNo of Node.

Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:226