LLVM API Documentation

llvm::SDOperand Class Reference

#include <SelectionDAGNodes.h>

Collaboration diagram for llvm::SDOperand:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SDOperand ()
 SDOperand (SDNode *val, unsigned resno)
bool operator== (const SDOperand &O) const
bool operator!= (const SDOperand &O) const
bool operator< (const SDOperand &O) const
SDOperand getValue (unsigned R) const
bool isOperand (SDNode *N) const
MVT::ValueType getValueType () const
unsigned getOpcode () const
unsigned getNodeDepth () const
unsigned getNumOperands () const
const SDOperandgetOperand (unsigned i) const
bool isTargetOpcode () const
unsigned getTargetOpcode () const
bool hasOneUse () const

Public Attributes

SDNodeVal
unsigned ResNo

Detailed Description

SDOperand - 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 SDOperand value type.

Definition at line 607 of file SelectionDAGNodes.h.


Constructor & Destructor Documentation

llvm::SDOperand::SDOperand (  )  [inline]

Definition at line 612 of file SelectionDAGNodes.h.

Referenced by getValue().

llvm::SDOperand::SDOperand ( SDNode val,
unsigned  resno 
) [inline]

Definition at line 613 of file SelectionDAGNodes.h.


Member Function Documentation

unsigned llvm::SDOperand::getNodeDepth (  )  const [inline]

Definition at line 1023 of file SelectionDAGNodes.h.

References llvm::SDNode::getNodeDepth(), and Val.

unsigned llvm::SDOperand::getNumOperands (  )  const [inline]

Definition at line 1029 of file SelectionDAGNodes.h.

References llvm::SDNode::getNumOperands(), and Val.

Referenced by CommuteVectorShuffle(), llvm::SelectionDAG::getNode(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), OperandConvertibleToType(), and ShouldXformedToMOVLP().

unsigned llvm::SDOperand::getOpcode (  )  const [inline]

Definition at line 1020 of file SelectionDAGNodes.h.

References llvm::SDNode::getOpcode(), and Val.

Referenced by llvm::PPC::get_VSPLTI_elt(), llvm::SelectionDAG::getNode(), llvm::X86::getShufflePSHUFHWImmediate(), llvm::X86::getShufflePSHUFLWImmediate(), llvm::X86::getShuffleSHUFImmediate(), llvm::ISD::isBuildVectorAllOnes(), llvm::ISD::isBuildVectorAllZeros(), isSetCCEquivalent(), llvm::PPC::isVSLDOIShuffleMask(), LookThroughSetCC(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), and llvm::PPCTargetLowering::PerformDAGCombine().

const SDOperand & llvm::SDOperand::getOperand ( unsigned  i  )  const [inline]

Definition at line 1032 of file SelectionDAGNodes.h.

References llvm::SDNode::getOperand(), and Val.

Referenced by BuildSDIVSequence(), BuildUDIVSequence(), CommuteVectorShuffle(), llvm::SelectionDAG::getNode(), isSetCCEquivalent(), LookThroughSetCC(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::PPCTargetLowering::PerformDAGCombine(), and ShouldXformedToMOVLP().

unsigned llvm::SDOperand::getTargetOpcode (  )  const [inline]

Definition at line 1038 of file SelectionDAGNodes.h.

References llvm::SDNode::getTargetOpcode(), and Val.

SDOperand llvm::SDOperand::getValue ( unsigned  R  )  const [inline]

Definition at line 625 of file SelectionDAGNodes.h.

References SDOperand(), and Val.

Referenced by llvm::SelectionDAGLowering::getLoadFrom(), llvm::PPC::isSplatShuffleMask(), llvm::PPCTargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerArguments(), llvm::PPCTargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::IA64TargetLowering::LowerOperation(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitIntrinsicCall(), llvm::SelectionDAGLowering::visitMemIntrinsic(), and llvm::SelectionDAGLowering::visitTargetIntrinsic().

MVT::ValueType llvm::SDOperand::getValueType (  )  const [inline]

getValueType - Return the ValueType of the referenced return value.

Definition at line 1026 of file SelectionDAGNodes.h.

References llvm::SDNode::getValueType(), ResNo, and Val.

Referenced by CommuteVectorShuffle(), CountOperands(), llvm::ScheduleDAG::EmitNode(), FindCallStartFromCallEnd(), GetConstantBuildVectorBits(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getNode(), llvm::ISD::isBuildVectorAllOnes(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitBr(), llvm::SelectionDAGLowering::visitCast(), llvm::SelectionDAGLowering::visitGetElementPtr(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitShift(), and llvm::SelectionDAGLowering::visitSwitchCase().

bool llvm::SDOperand::hasOneUse (  )  const [inline]

hasOneUse - Return true if there is exactly one operation using this result value of the defining operator.

Definition at line 1041 of file SelectionDAGNodes.h.

References llvm::SDNode::hasNUsesOfValue(), ResNo, and Val.

Referenced by llvm::X86TargetLowering::LowerOperation(), and llvm::PPCTargetLowering::PerformDAGCombine().

bool SDOperand::isOperand ( SDNode N  )  const

Definition at line 2640 of file SelectionDAG.cpp.

References llvm::SDNode::getNumOperands(), and llvm::SDNode::getOperand().

bool llvm::SDOperand::isTargetOpcode (  )  const [inline]

Definition at line 1035 of file SelectionDAGNodes.h.

References llvm::SDNode::isTargetOpcode(), and Val.

bool llvm::SDOperand::operator!= ( const SDOperand O  )  const [inline]

Definition at line 618 of file SelectionDAGNodes.h.

References O, and operator==().

bool llvm::SDOperand::operator< ( const SDOperand O  )  const [inline]

Definition at line 621 of file SelectionDAGNodes.h.

References O, ResNo, and Val.

bool llvm::SDOperand::operator== ( const SDOperand O  )  const [inline]

Definition at line 615 of file SelectionDAGNodes.h.

References O, ResNo, and Val.

Referenced by operator!=().


Member Data Documentation

unsigned llvm::SDOperand::ResNo

Definition at line 610 of file SelectionDAGNodes.h.

Referenced by getValueType(), hasOneUse(), operator<(), operator==(), and llvm::SelectionDAG::UpdateNodeOperands().

SDNode* llvm::SDOperand::Val

Definition at line 609 of file SelectionDAGNodes.h.

Referenced by DumpNodes(), llvm::PPC::get_VSPLTI_elt(), llvm::SelectionDAG::getNode(), getNodeDepth(), getNumOperands(), getOpcode(), getOperand(), llvm::SelectionDAG::getTargetNode(), getTargetOpcode(), getValue(), llvm::SelectionDAGLowering::getValue(), getValueType(), hasOneUse(), isInvertibleForFree(), isOneUseSetCC(), isOpcWithIntImmediate(), llvm::SDNode::isOperand(), isRotateAndMask(), isTargetOpcode(), llvm::TargetLowering::LowerArguments(), llvm::PPCTargetLowering::LowerArguments(), llvm::PPCTargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerCallTo(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::SDNodeIterator::operator *(), operator<(), operator==(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::SelectionDAG::ReplaceAllUsesOfValueWith(), llvm::SelectionDAG::ReplaceAllUsesWith(), llvm::SDNode::SDNode(), llvm::SDNode::setOperands(), llvm::SelectionDAG::UpdateNodeOperands(), llvm::SelectionDAGLowering::visitExtractElement(), llvm::SelectionDAGLowering::visitInsertElement(), llvm::SelectionDAGLowering::visitShuffleVector(), and llvm::SelectionDAGLowering::visitTargetIntrinsic().


The documentation for this class was generated from the following files: