llvm::SDValue

Pair of an SDNode and a result number selecting one of its values.

Synopsis

Declared in <llvm/CodeGen/SelectionDAGNodes.h>

class SDValue;

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.

Member Functions

NameDescription
SDValue [constructor]Constructors
dump dump overloads
dumpr dumpr overloads
getConstantOperandAPInt Return the APInt of ConstantSDNode operand i.
getConstantOperandVal Return the integer value of ConstantSDNode operand i.
getDebugLoc Return the debug location of the referenced node.
getMachineOpcode Return the machine opcode of the referenced node.
getNode Return the SDNode which holds the desired result.
getNumOperands Return the number of operands of the referenced node.
getOpcode Return the opcode of the referenced node.
getOperand Return operand i of the referenced node.
getResNo Return the result index selecting a specific result in the SDNode.
getScalarValueSizeInBits Return the fixed size in bits of the scalar value type.
getSimpleValueType Return the simple ValueType of the referenced return value.
getValue Return the SDValue for result R of the same node.
getValueSizeInBits Return the size of the value in bits.
getValueType Return the ValueType of the referenced return value.
hasOneUse Return true if exactly one use references this value.
hasOneUser Return true if exactly one user references this value.
isAnyAdd Return true if the referenced node is ADD or PTRADD.
isMachineOpcode Return true if the referenced node has a machine opcode.
isOperandOf Return true if the referenced return value is an operand of N.
isTargetOpcode Return true if the referenced node has a target-specific opcode.
isUndef Return true if the referenced node is UNDEF or POISON.
operator-> Return the referenced SDNode.
reachesChainWithoutSideEffects Return true if this chain reaches Dest without side effects.
setNode Set the SDNode referenced by this value.
use_empty Return true if there are no nodes using value ResNo of Node.
operator bool Return true if this SDValue references a non-null node.
operator== Return true if this SDValue equals O.
operator!= Return true if this SDValue differs from O.
operator< Return true if this SDValue is ordered before O.

Friends

NameDescription
llvm::DenseMapInfo<SDValue>DenseMapInfo specialization for SDValue keys.

Non-Member Functions

NameDescription
getBitwiseNotOperandIf V is a bitwise not, return the inverted operand.
isAllOnesConstantReturns true if V is an integer constant with all bits set.
isAllOnesOrAllOnesSplatReturn true if the value is a constant -1 integer or splat.
isBitwiseNotReturns true if V is a bitwise not operation.
isConstOrConstSplatReturns the SDNode if it is a demanded constant splat BuildVector or constant int.
isConstOrConstSplatReturns the SDNode if it is a constant splat BuildVector or constant int.
isConstOrConstSplatFPReturns the SDNode if it is a demanded constant splat BuildVector or constant float.
isConstOrConstSplatFPReturns the SDNode if it is a constant splat BuildVector or constant float.
isIntOrFPConstantReturn true if V is either a integer or FP constant.
isMinSignedConstantReturns true if V is a constant min signed integer value.
isNullConstantReturns true if V is a constant integer zero.
isNullConstantOrUndefReturns true if V is a constant integer zero or an UNDEF node.
isNullFPConstantReturns true if V is an FP constant with a value of positive zero.
isNullOrNullSplatReturn true if the value is a constant 0 integer or a null splat.
isOneConstantReturns true if V is a constant integer one.
isOneOrOneSplatReturn true if the value is a constant 1 integer or a one splat.
isOneOrOneSplatFPReturn true if the value is an FP 1.0 constant or splat.
isOnesOrOnesSplatReturn true if the value is a constant 1 integer or splat without truncation.
isZeroOrZeroSplatReturn true if the value is a constant 0 integer or splat.
isZeroOrZeroSplatFPReturn true if the value is a (+/-)0.0 FP constant or splat.
peekThroughBitcastsReturn the non-bitcasted source operand of V if it exists. If V is not a bitcasted value, it is returned as-is.
peekThroughExtractSubvectorsReturn the non-extracted vector source operand of V if it exists. If V is not an extracted subvector, it is returned as-is.
peekThroughFreezeReturn the non-frozen source operand of V if it exists. If V is not a freeze, it is returned as-is.
peekThroughInsertVectorEltRecursively peek through INSERT_VECTOR_ELT nodes.
peekThroughOneUseBitcastsReturn the non-bitcasted and one-use source operand of V if it exists. If V is not a bitcasted one-use value, it is returned as-is.
peekThroughOneUseFreezeReturn the non-frozen one-use source operand of V if it exists.
peekThroughTruncatesReturn the non-truncated source operand of V if it exists. If V is not a truncation, it is returned as-is.
ISD::isOverflowIntrOpResReturn true if Op is an overflow result of an overflow intrinsic.
ISD::matchBinaryPredicateMatch a binary predicate against paired scalar/splat/BUILD_VECTOR constants.
ISD::matchBinaryPredicateMatch a binary predicate over all elements of LHS and RHS.
ISD::matchUnaryFpPredicateMatch a ConstantFPSDNode unary predicate with demanded elements.
ISD::matchUnaryFpPredicateMatch a ConstantFPSDNode unary predicate over all elements.
ISD::matchUnaryPredicateMatch a ConstantSDNode unary predicate with demanded elements.
ISD::matchUnaryPredicateMatch a ConstantSDNode unary predicate over all elements.
ISD::matchUnaryPredicateImplMatch a unary predicate against scalar/splat/BUILD_VECTOR constants.
SDPatternMatch::m_DeferredMatch the SDValue previously bound into V by another sub-pattern.
SDPatternMatch::m_SpecificMatch the specific SDValue N.
SDPatternMatch::m_SpecificNegMatch a negation of a specific value V, either as sub(0, V) or as constant(s) that are the negation of V's constant(s).
SDPatternMatch::m_ValueMatch any SDValue and bind it into N.
SDPatternMatch::m_ValueConditionally bind an SDValue based on the predicate.
SDPatternMatch::sd_context_matchMatch SDValue N against pattern P under match context Ctx.
SDPatternMatch::sd_matchMatch SDValue N against pattern P without a SelectionDAG.
SDPatternMatch::sd_matchMatch SDValue N against pattern P using a BasicMatchContext for DAG.