LLVM API Documentation

llvm::SelectionDAG Class Reference

#include <SelectionDAG.h>

Collaboration diagram for llvm::SelectionDAG:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ilist< SDNode >::const_iterator allnodes_const_iterator
typedef ilist< SDNode >::iterator allnodes_iterator

Public Member Functions

 SelectionDAG (TargetLowering &tli, MachineFunction &mf, MachineDebugInfo *di)
 ~SelectionDAG ()
MachineFunctiongetMachineFunction () const
const TargetMachinegetTarget () const
TargetLoweringgetTargetLoweringInfo () const
MachineDebugInfogetMachineDebugInfo () const
void viewGraph ()
allnodes_const_iterator allnodes_begin () const
allnodes_const_iterator allnodes_end () const
allnodes_iterator allnodes_begin ()
allnodes_iterator allnodes_end ()
const SDOperandgetRoot () const
const SDOperandgetEntryNode () const
const SDOperandsetRoot (SDOperand N)
void Combine (bool AfterLegalize)
void Legalize ()
void RemoveDeadNodes (SDNode *N=0)
SDOperand getString (const std::string &Val)
SDOperand getConstant (uint64_t Val, MVT::ValueType VT)
SDOperand getTargetConstant (uint64_t Val, MVT::ValueType VT)
SDOperand getConstantFP (double Val, MVT::ValueType VT)
SDOperand getTargetConstantFP (double Val, MVT::ValueType VT)
SDOperand getGlobalAddress (const GlobalValue *GV, MVT::ValueType VT, int offset=0)
SDOperand getTargetGlobalAddress (const GlobalValue *GV, MVT::ValueType VT, int offset=0)
SDOperand getFrameIndex (int FI, MVT::ValueType VT)
SDOperand getTargetFrameIndex (int FI, MVT::ValueType VT)
SDOperand getJumpTable (int JTI, MVT::ValueType VT)
SDOperand getTargetJumpTable (int JTI, MVT::ValueType VT)
SDOperand getConstantPool (Constant *C, MVT::ValueType VT, unsigned Alignment=0, int offset=0)
SDOperand getTargetConstantPool (Constant *C, MVT::ValueType VT, unsigned Alignment=0, int offset=0)
SDOperand getBasicBlock (MachineBasicBlock *MBB)
SDOperand getExternalSymbol (const char *Sym, MVT::ValueType VT)
SDOperand getTargetExternalSymbol (const char *Sym, MVT::ValueType VT)
SDOperand getValueType (MVT::ValueType)
SDOperand getRegister (unsigned Reg, MVT::ValueType VT)
SDOperand getCopyToReg (SDOperand Chain, unsigned Reg, SDOperand N)
SDOperand getCopyToReg (SDOperand Chain, unsigned Reg, SDOperand N, SDOperand Flag)
SDOperand getCopyToReg (SDOperand Chain, SDOperand Reg, SDOperand N, SDOperand Flag)
SDOperand getCopyFromReg (SDOperand Chain, unsigned Reg, MVT::ValueType VT)
SDOperand getCopyFromReg (SDOperand Chain, unsigned Reg, MVT::ValueType VT, SDOperand Flag)
SDOperand getCondCode (ISD::CondCode Cond)
SDOperand getZeroExtendInReg (SDOperand Op, MVT::ValueType SrcTy)
SDOperand getCALLSEQ_START (SDOperand Chain, SDOperand Op)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, SDOperand N)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, SDOperand N1, SDOperand N2)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, SDOperand N1, SDOperand N2, SDOperand N3)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4, SDOperand N5)
SDOperand getNode (unsigned Opcode, MVT::ValueType VT, std::vector< SDOperand > &Children)
SDOperand getNode (unsigned Opcode, std::vector< MVT::ValueType > &ResultTys, std::vector< SDOperand > &Ops)
SDOperand getSetCC (MVT::ValueType VT, SDOperand LHS, SDOperand RHS, ISD::CondCode Cond)
SDOperand getSelectCC (SDOperand LHS, SDOperand RHS, SDOperand True, SDOperand False, ISD::CondCode Cond)
SDOperand getVAArg (MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV)
SDOperand getLoad (MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV)
SDOperand getVecLoad (unsigned Count, MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV)
SDOperand getExtLoad (unsigned Opcode, MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV, MVT::ValueType EVT)
SDOperand getSrcValue (const Value *I, int offset=0)
SDOperand UpdateNodeOperands (SDOperand N, SDOperand Op)
SDOperand UpdateNodeOperands (SDOperand N, SDOperand Op1, SDOperand Op2)
SDOperand UpdateNodeOperands (SDOperand N, SDOperand Op1, SDOperand Op2, SDOperand Op3)
SDOperand UpdateNodeOperands (SDOperand N, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4)
SDOperand UpdateNodeOperands (SDOperand N, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDOperand UpdateNodeOperands (SDOperand N, const std::vector< SDOperand > &Op)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7, SDOperand Op8)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4)
SDOperand SelectNodeTo (SDNode *N, unsigned TargetOpc, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7, SDOperand Op8)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT, std::vector< SDOperand > &Ops)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, MVT::ValueType VT3, SDOperand Op1, SDOperand Op2)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, MVT::ValueType VT3, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, MVT::ValueType VT3, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, MVT::ValueType VT3, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7)
SDNodegetTargetNode (unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, std::vector< SDOperand > &Ops)
void ReplaceAllUsesWith (SDOperand From, SDOperand Op, std::vector< SDNode * > *Deleted=0)
void ReplaceAllUsesWith (SDNode *From, SDNode *To, std::vector< SDNode * > *Deleted=0)
void ReplaceAllUsesWith (SDNode *From, const std::vector< SDOperand > &To, std::vector< SDNode * > *Deleted=0)
void ReplaceAllUsesOfValueWith (SDOperand From, SDOperand To, std::vector< SDNode * > &Deleted)
void DeleteNode (SDNode *N)
void dump () const

Static Public Member Functions

static void InsertISelMapEntry (std::map< SDOperand, SDOperand > &Map, SDNode *Key, unsigned KeyResNo, SDNode *Element, unsigned ElementResNo)
static void InsertInFlightSetEntry (std::set< SDNode * > &Set, SDNode *N)
static void RemoveInFlightSetEntry (std::set< SDNode * > &Set, SDNode *N)

Detailed Description

SelectionDAG class - This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representation suitable for instruction selection. This DAG is constructed as the first step of instruction selection in order to allow implementation of machine specific optimizations and code simplifications.

The representation used by the SelectionDAG is a target-independent representation, which has some similarities to the GCC RTL representation, but is significantly more simple, powerful, and is a graph form instead of a linear form.

Definition at line 43 of file SelectionDAG.h.


Member Typedef Documentation

typedef ilist<SDNode>::const_iterator llvm::SelectionDAG::allnodes_const_iterator

Definition at line 74 of file SelectionDAG.h.

typedef ilist<SDNode>::iterator llvm::SelectionDAG::allnodes_iterator

Definition at line 77 of file SelectionDAG.h.


Constructor & Destructor Documentation

llvm::SelectionDAG::SelectionDAG ( TargetLowering tli,
MachineFunction mf,
MachineDebugInfo di 
) [inline]

Definition at line 58 of file SelectionDAG.h.

References llvm::ISD::EntryToken, getNode(), and llvm::MVT::Other.

SelectionDAG::~SelectionDAG (  ) 

Definition at line 651 of file SelectionDAG.cpp.

References llvm::SDNode::NumOperands, and llvm::SDNode::OperandList.


Member Function Documentation

MachineFunction& llvm::SelectionDAG::getMachineFunction (  )  const [inline]

Definition at line 64 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::EmitSchedule(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::IA64TargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerCallTo(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), llvm::AlphaTargetLowering::LowerOperation(), LowerRET(), LowerSCALAR_TO_VECTOR(), LowerSINT_TO_FP(), PerformShuffleCombine(), and viewGraph().

const TargetMachine & SelectionDAG::getTarget (  )  const

Definition at line 256 of file SelectionDAG.cpp.

References llvm::TargetLowering::getTargetMachine().

Referenced by llvm::createBFS_DAGScheduler(), llvm::createBURRListDAGScheduler(), llvm::createSimpleDAGScheduler(), llvm::createTDListDAGScheduler(), llvm::createTDRRListDAGScheduler(), llvm::SelectionDAGLowering::GetRegistersForValue(), LowerConstantPool(), LowerGlobalAddress(), and LowerJumpTable().

TargetLowering& llvm::SelectionDAG::getTargetLoweringInfo (  )  const [inline]

Definition at line 66 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::EmitNode(), LowerCALL(), and LowerFORMAL_ARGUMENTS().

MachineDebugInfo* llvm::SelectionDAG::getMachineDebugInfo (  )  const [inline]

Definition at line 67 of file SelectionDAG.h.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

void SelectionDAG::viewGraph (  ) 

viewGraph - Pop up a ghostview window with the DAG rendered using 'dot'.

Definition at line 125 of file SelectionDAGPrinter.cpp.

References getMachineFunction(), llvm::Intrinsic::getName(), and llvm::ViewGraph().

Referenced by Legalize(), and llvm::SelectionDAGISel::ScheduleAndEmitDAG().

allnodes_const_iterator llvm::SelectionDAG::allnodes_begin (  )  const [inline]

Definition at line 75 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::BuildSchedUnits(), dump(), and RemoveDeadNodes().

allnodes_const_iterator llvm::SelectionDAG::allnodes_end (  )  const [inline]

Definition at line 76 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::BuildSchedUnits(), dump(), and RemoveDeadNodes().

allnodes_iterator llvm::SelectionDAG::allnodes_begin (  )  [inline]

Definition at line 78 of file SelectionDAG.h.

allnodes_iterator llvm::SelectionDAG::allnodes_end (  )  [inline]

Definition at line 79 of file SelectionDAG.h.

const SDOperand& llvm::SelectionDAG::getRoot (  )  const [inline]

getRoot - Return the root tag of the SelectionDAG.

Definition at line 83 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::CalculateHeights(), dump(), llvm::SelectionDAGLowering::getRoot(), llvm::TargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerArguments(), RemoveDeadNodes(), llvm::SelectionDAGLowering::visitLoad(), and llvm::SelectionDAGLowering::visitTargetIntrinsic().

const SDOperand& llvm::SelectionDAG::getEntryNode (  )  const [inline]

getEntryNode - Return the token chain corresponding to the entry of the function.

Definition at line 87 of file SelectionDAG.h.

Referenced by llvm::ScheduleDAG::CalculateDepths(), llvm::IA64TargetLowering::LowerArguments(), llvm::X86TargetLowering::LowerFrameReturnAddress(), LowerGlobalAddress(), llvm::AlphaTargetLowering::LowerOperation(), LowerSCALAR_TO_VECTOR(), LowerSINT_TO_FP(), llvm::SelectionDAGLowering::visitShr(), and llvm::SelectionDAGLowering::visitUnwind().

const SDOperand& llvm::SelectionDAG::setRoot ( SDOperand  N  )  [inline]

setRoot - Set the current root tag of the SelectionDAG.

Definition at line 91 of file SelectionDAG.h.

Referenced by llvm::SelectionDAGLowering::getLoadFrom(), llvm::SelectionDAGLowering::getRoot(), llvm::TargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerArguments(), RemoveDeadNodes(), llvm::SelectionDAGLowering::visitAlloca(), llvm::SelectionDAGLowering::visitBr(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitFrameReturnAddress(), llvm::SelectionDAGLowering::visitFree(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitIntrinsicCall(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitMalloc(), llvm::SelectionDAGLowering::visitMemIntrinsic(), llvm::SelectionDAGLowering::visitStore(), llvm::SelectionDAGLowering::visitSwitch(), llvm::SelectionDAGLowering::visitSwitchCase(), llvm::SelectionDAGLowering::visitTargetIntrinsic(), llvm::SelectionDAGLowering::visitVAArg(), llvm::SelectionDAGLowering::visitVACopy(), llvm::SelectionDAGLowering::visitVAEnd(), and llvm::SelectionDAGLowering::visitVAStart().

void SelectionDAG::Combine ( bool  AfterLegalize  ) 

Combine - This iterates over the nodes in the SelectionDAG, folding certain types of nodes together, or eliminating superfluous nodes. When the AfterLegalize argument is set to 'true', Combine takes care not to generate any nodes that will be illegal on the target.

run - This is the main entry point to this class.

Definition at line 3612 of file DAGCombiner.cpp.

void SelectionDAG::Legalize (  ) 

Legalize - This transforms the SelectionDAG into a SelectionDAG that is compatible with the target instruction selector, as indicated by the TargetLowering object.

Note that this is an involved process that may invalidate pointers into the graph.

run - This is the main entry point to this class.

Definition at line 4975 of file LegalizeDAG.cpp.

References viewGraph().

void SelectionDAG::RemoveDeadNodes ( SDNode N = 0  ) 

RemoveDeadNodes - This method deletes all unreachable nodes in the SelectionDAG, including nodes (like loads) that have uses of their token chain but no other uses and no side effect. If a node is passed in as an argument, it is used as the seed for node deletion.

Definition at line 268 of file SelectionDAG.cpp.

References allnodes_begin(), allnodes_end(), E, getRoot(), llvm::HandleSDNode::getValue(), MadeChange, setRoot(), and llvm::SDNode::use_empty().

SDOperand SelectionDAG::getString ( const std::string &  Val  ) 

Definition at line 683 of file SelectionDAG.cpp.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

SDOperand SelectionDAG::getConstant ( uint64_t  Val,
MVT::ValueType  VT 
)

Definition at line 668 of file SelectionDAG.cpp.

References llvm::MVT::getSizeInBits(), llvm::MVT::i64, llvm::MVT::isInteger(), and llvm::MVT::isVector().

Referenced by BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), BuildVSLDOI(), CommuteVectorShuffle(), GeneratePerfectShuffle(), getMemBasePlusOffset(), getMemsetStringVal(), getMemsetValue(), getMOVLMask(), getNode(), getShuffleVectorZeroOrUndef(), getUnpackhMask(), getUnpacklMask(), llvm::SelectionDAGLowering::getValue(), getVecLoad(), getZeroExtendInReg(), getZeroVector(), isBLACompatibleAddress(), llvm::TargetLowering::LowerArguments(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), LowerCALL(), llvm::TargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), LowerConstantPool(), LowerFORMAL_ARGUMENTS(), llvm::X86TargetLowering::LowerFrameReturnAddress(), llvm::TargetLowering::LowerFrameReturnAddress(), LowerGlobalAddress(), LowerINTRINSIC_WO_CHAIN(), LowerJumpTable(), LowerMUL(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerSETCC(), LowerSHL(), LowerSRA(), LowerSRL(), LowerVECTOR_SHUFFLE(), NormalizeMask(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitBr(), llvm::SelectionDAGLowering::visitCast(), llvm::SelectionDAGLowering::visitGetElementPtr(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitIntrinsicCall(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitSwitch(), llvm::SelectionDAGLowering::visitSwitchCase(), llvm::SelectionDAGLowering::visitTargetIntrinsic(), and llvm::SelectionDAGLowering::visitUserOp2().

SDOperand SelectionDAG::getTargetConstant ( uint64_t  Val,
MVT::ValueType  VT 
)

Definition at line 692 of file SelectionDAG.cpp.

References llvm::MVT::getSizeInBits(), llvm::MVT::i64, and llvm::MVT::isInteger().

Referenced by llvm::PPC::get_VSPLTI_elt().

SDOperand SelectionDAG::getConstantFP ( double  Val,
MVT::ValueType  VT 
)

Definition at line 705 of file SelectionDAG.cpp.

References llvm::DoubleToBits(), llvm::MVT::f32, and llvm::MVT::isFloatingPoint().

Referenced by getNode(), llvm::SelectionDAGLowering::getValue(), getZeroVector(), and llvm::SelectionDAGLowering::visitCast().

SDOperand SelectionDAG::getTargetConstantFP ( double  Val,
MVT::ValueType  VT 
)

Definition at line 720 of file SelectionDAG.cpp.

References llvm::DoubleToBits(), llvm::MVT::f32, and llvm::MVT::isFloatingPoint().

SDOperand SelectionDAG::getGlobalAddress ( const GlobalValue GV,
MVT::ValueType  VT,
int  offset = 0 
)

Definition at line 735 of file SelectionDAG.cpp.

References GV.

Referenced by llvm::SelectionDAGLowering::getValue().

SDOperand SelectionDAG::getTargetGlobalAddress ( const GlobalValue GV,
MVT::ValueType  VT,
int  offset = 0 
)

Definition at line 744 of file SelectionDAG.cpp.

References GV.

Referenced by LowerCALL(), LowerGlobalAddress(), and llvm::AlphaTargetLowering::LowerOperation().

SDOperand SelectionDAG::getFrameIndex ( int  FI,
MVT::ValueType  VT 
)

Definition at line 753 of file SelectionDAG.cpp.

Referenced by llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::IA64TargetLowering::LowerArguments(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerSCALAR_TO_VECTOR(), LowerSINT_TO_FP(), and LowerVASTART().

SDOperand SelectionDAG::getTargetFrameIndex ( int  FI,
MVT::ValueType  VT 
)

Definition at line 761 of file SelectionDAG.cpp.

SDOperand SelectionDAG::getJumpTable ( int  JTI,
MVT::ValueType  VT 
)

Definition at line 769 of file SelectionDAG.cpp.

Referenced by llvm::SelectionDAGLowering::visitJumpTable().

SDOperand SelectionDAG::getTargetJumpTable ( int  JTI,
MVT::ValueType  VT 
)

Definition at line 777 of file SelectionDAG.cpp.

Referenced by LowerJumpTable().

SDOperand SelectionDAG::getConstantPool ( Constant C,
MVT::ValueType  VT,
unsigned  Alignment = 0,
int  offset = 0 
)

Definition at line 785 of file SelectionDAG.cpp.

References C.

SDOperand SelectionDAG::getTargetConstantPool ( Constant C,
MVT::ValueType  VT,
unsigned  Alignment = 0,
int  offset = 0 
)

Definition at line 795 of file SelectionDAG.cpp.

References C.

Referenced by LowerConstantPool(), and llvm::AlphaTargetLowering::LowerOperation().

SDOperand SelectionDAG::getBasicBlock ( MachineBasicBlock MBB  ) 

Definition at line 805 of file SelectionDAG.cpp.

References MBB.

Referenced by llvm::SelectionDAGLowering::visitBr(), llvm::SelectionDAGLowering::visitSwitch(), and llvm::SelectionDAGLowering::visitSwitchCase().

SDOperand SelectionDAG::getExternalSymbol ( const char *  Sym,
MVT::ValueType  VT 
)

Definition at line 824 of file SelectionDAG.cpp.

Referenced by llvm::AlphaTargetLowering::LowerOperation(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitFree(), and llvm::SelectionDAGLowering::visitMalloc().

SDOperand SelectionDAG::getTargetExternalSymbol ( const char *  Sym,
MVT::ValueType  VT 
)

Definition at line 832 of file SelectionDAG.cpp.

Referenced by LowerCALL(), llvm::AlphaTargetLowering::LowerOperation(), and llvm::SelectionDAGLowering::visitInlineAsm().

SDOperand SelectionDAG::getValueType ( MVT::ValueType   ) 

Definition at line 813 of file SelectionDAG.cpp.

Referenced by getExtLoad(), getNode(), llvm::SelectionDAGLowering::getValue(), getVecLoad(), llvm::TargetLowering::LowerArguments(), llvm::TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerOperation(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitCast(), and llvm::SelectionDAGLowering::visitTargetIntrinsic().

SDOperand SelectionDAG::getRegister ( unsigned  Reg,
MVT::ValueType  VT 
)

Definition at line 852 of file SelectionDAG.cpp.

References Reg.

Referenced by getCopyFromReg(), getCopyToReg(), LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), LowerINTRINSIC_WO_CHAIN(), LowerRET(), and llvm::PPCTargetLowering::PerformDAGCombine().

SDOperand llvm::SelectionDAG::getCopyToReg ( SDOperand  Chain,
unsigned  Reg,
SDOperand  N 
) [inline]

Definition at line 136 of file SelectionDAG.h.

References llvm::ISD::CopyToReg, getNode(), getRegister(), llvm::SDOperand::getValueType(), and llvm::MVT::Other.

Referenced by LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerOperation(), LowerRET(), and llvm::SelectionDAGLowering::visitSwitch().

SDOperand llvm::SelectionDAG::getCopyToReg ( SDOperand  Chain,
unsigned  Reg,
SDOperand  N,
SDOperand  Flag 
) [inline]

Definition at line 144 of file SelectionDAG.h.

References llvm::ISD::CopyToReg, llvm::MVT::Flag, getNode(), getRegister(), llvm::SDOperand::getValueType(), Ops, and llvm::MVT::Other.

SDOperand llvm::SelectionDAG::getCopyToReg ( SDOperand  Chain,
SDOperand  Reg,
SDOperand  N,
SDOperand  Flag 
) [inline]

Definition at line 158 of file SelectionDAG.h.

References llvm::ISD::CopyToReg, llvm::MVT::Flag, getNode(), Ops, llvm::MVT::Other, and Reg.

SDOperand llvm::SelectionDAG::getCopyFromReg ( SDOperand  Chain,
unsigned  Reg,
MVT::ValueType  VT 
) [inline]

Definition at line 171 of file SelectionDAG.h.

References llvm::ISD::CopyFromReg, getNode(), getRegister(), Ops, and llvm::MVT::Other.

Referenced by llvm::IA64TargetLowering::LowerArguments(), LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), llvm::IA64TargetLowering::LowerOperation(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitShr(), and llvm::SelectionDAGLowering::visitUnwind().

SDOperand llvm::SelectionDAG::getCopyFromReg ( SDOperand  Chain,
unsigned  Reg,
MVT::ValueType  VT,
SDOperand  Flag 
) [inline]

Definition at line 184 of file SelectionDAG.h.

References llvm::ISD::CopyFromReg, llvm::MVT::Flag, getNode(), getRegister(), Ops, and llvm::MVT::Other.

SDOperand SelectionDAG::getCondCode ( ISD::CondCode  Cond  ) 

Definition at line 841 of file SelectionDAG.cpp.

Referenced by getSelectCC(), and getSetCC().

SDOperand SelectionDAG::getZeroExtendInReg ( SDOperand  Op,
MVT::ValueType  SrcTy 
)

getZeroExtendInReg - Return the expression required to zero extend the Op value assuming it was the smaller SrcTy value.

Definition at line 661 of file SelectionDAG.cpp.

References llvm::ISD::AND, getConstant(), getNode(), llvm::MVT::getSizeInBits(), Imm, and Op.

SDOperand llvm::SelectionDAG::getCALLSEQ_START ( SDOperand  Chain,
SDOperand  Op 
) [inline]

getCALLSEQ_START - Return a new CALLSEQ_START node, which always must have a flag result (to ensure it's not CSE'd).

Definition at line 205 of file SelectionDAG.h.

References llvm::ISD::CALLSEQ_START, llvm::MVT::Flag, getNode(), Op, Ops, and llvm::MVT::Other.

Referenced by LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), and llvm::AlphaTargetLowering::LowerCallTo().

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT 
)

getNode - Gets or creates the specified node.

Definition at line 1079 of file SelectionDAG.cpp.

Referenced by BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), BuildVSLDOI(), CommuteVectorShuffle(), GeneratePerfectShuffle(), getCALLSEQ_START(), getCopyFromReg(), getCopyToReg(), getExtLoad(), getMemBasePlusOffset(), getMemsetValue(), getMOVLMask(), getNode(), llvm::SelectionDAGLowering::getRoot(), getSelectCC(), getSetCC(), getShuffleScalarElt(), getShuffleVectorZeroOrUndef(), getTargetNode(), getUnpackhMask(), getUnpacklMask(), getVAArg(), llvm::SelectionDAGLowering::getValue(), getVecLoad(), getZeroExtendInReg(), getZeroVector(), llvm::TargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerArguments(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), LowerCALL(), llvm::TargetLowering::LowerCallTo(), llvm::IA64TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), LowerConstantPool(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), LowerFP_TO_SINT(), llvm::X86TargetLowering::LowerFrameReturnAddress(), LowerGlobalAddress(), LowerINTRINSIC_WO_CHAIN(), LowerJumpTable(), LowerMUL(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerRET(), LowerSCALAR_TO_VECTOR(), LowerSELECT_CC(), LowerSETCC(), LowerSHL(), LowerSINT_TO_FP(), LowerSRA(), LowerSRL(), LowerVASTART(), LowerVECTOR_SHUFFLE(), NormalizeMask(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformShuffleCombine(), PromoteSplat(), SelectionDAG(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::SelectionDAGLowering::visitAdd(), llvm::SelectionDAGLowering::visitAlloca(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitBr(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitCast(), llvm::SelectionDAGLowering::visitExtractElement(), llvm::SelectionDAGLowering::visitGetElementPtr(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitInsertElement(), llvm::SelectionDAGLowering::visitIntrinsicCall(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitMalloc(), llvm::SelectionDAGLowering::visitMemIntrinsic(), llvm::SelectionDAGLowering::visitSelect(), llvm::SelectionDAGLowering::visitShift(), llvm::SelectionDAGLowering::visitShuffleVector(), llvm::SelectionDAGLowering::visitStore(), llvm::SelectionDAGLowering::visitSub(), llvm::SelectionDAGLowering::visitSwitch(), llvm::SelectionDAGLowering::visitSwitchCase(), llvm::SelectionDAGLowering::visitTargetIntrinsic(), llvm::SelectionDAGLowering::visitUserOp2(), llvm::SelectionDAGLowering::visitVACopy(), llvm::SelectionDAGLowering::visitVAEnd(), and llvm::SelectionDAGLowering::visitVAStart().

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  N 
)

Definition at line 1088 of file SelectionDAG.cpp.

References llvm::ISD::ANY_EXTEND, llvm::ISD::BIT_CONVERT, llvm::BitsToDouble(), llvm::BitsToFloat(), llvm::ISD::BSWAP, llvm::ByteSwap_16(), llvm::ByteSwap_32(), llvm::ByteSwap_64(), C, llvm::CountLeadingZeros_32(), llvm::CountLeadingZeros_64(), llvm::CountPopulation_32(), llvm::CountPopulation_64(), llvm::CountTrailingZeros_32(), llvm::CountTrailingZeros_64(), llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::DoubleToBits(), E, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FABS, llvm::MVT::Flag, llvm::FloatToBits(), llvm::ISD::FNEG, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FSUB, getConstant(), getConstantFP(), getNode(), llvm::SDNode::getOperand(), llvm::MVT::getSizeInBits(), llvm::MVT::getVectorBaseType(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::MVT::isVector(), Operand, llvm::ISD::SCALAR_TO_VECTOR, llvm::SDNode::setValueTypes(), llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::ISD::UNDEF, llvm::SDOperand::Val, Val, and llvm::ISD::ZERO_EXTEND.

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  N1,
SDOperand  N2 
)

Definition at line 1268 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, F, llvm::ISD::FADD, llvm::ISD::FCOPYSIGN, llvm::ISD::FDIV, llvm::MVT::Flag, llvm::ISD::FMUL, llvm::ISD::FP_ROUND_INREG, llvm::ISD::FREM, llvm::ISD::FSUB, getConstant(), getConstantFP(), llvm::MVT::getIntVTBitMask(), getNode(), llvm::SDOperand::getOpcode(), llvm::SDOperand::getOperand(), llvm::ConstantSDNode::getSignExtended(), llvm::MVT::getSizeInBits(), llvm::ConstantFPSDNode::getValue(), llvm::ConstantSDNode::getValue(), llvm::SDOperand::getValueType(), llvm::MVT::i1, isCommutativeBinOp(), llvm::MVT::isFloatingPoint(), llvm::MVT::isInteger(), llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::ISD::OR, llvm::MVT::Other, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIV, llvm::SDNode::setValueTypes(), llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SUB, llvm::ISD::TokenFactor, llvm::ISD::UDIV, llvm::ISD::UNDEF, llvm::ISD::UREM, Val, llvm::SDOperand::Val, and llvm::ISD::XOR.

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  N1,
SDOperand  N2,
SDOperand  N3 
)

Definition at line 1535 of file SelectionDAG.cpp.

References llvm::ISD::BR, llvm::ISD::BRCOND, llvm::ISD::BUILD_VECTOR, E, llvm::MVT::Flag, getNode(), llvm::SDOperand::getNumOperands(), llvm::SDOperand::getOpcode(), llvm::ConstantSDNode::getValue(), llvm::SDOperand::getValueType(), llvm::MVT::getVectorNumElements(), llvm::MVT::isVector(), llvm::MVT::Other, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::SDNode::setValueTypes(), llvm::SDOperand::Val, and llvm::ISD::VECTOR_SHUFFLE.

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  N1,
SDOperand  N2,
SDOperand  N3,
SDOperand  N4 
)

Definition at line 1593 of file SelectionDAG.cpp.

References getNode().

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  N1,
SDOperand  N2,
SDOperand  N3,
SDOperand  N4,
SDOperand  N5 
)

Definition at line 1605 of file SelectionDAG.cpp.

References getNode().

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
MVT::ValueType  VT,
std::vector< SDOperand > &  Children 
)

Definition at line 1687 of file SelectionDAG.cpp.

References llvm::ISD::BR_CC, E, llvm::MVT::Flag, getNode(), getValueType(), llvm::MVT::isInteger(), Op, llvm::ISD::SELECT_CC, llvm::SDNode::setValueTypes(), llvm::ISD::STORE, llvm::ISD::TRUNCATE, and llvm::ISD::TRUNCSTORE.

SDOperand SelectionDAG::getNode ( unsigned  Opcode,
std::vector< MVT::ValueType > &  ResultTys,
std::vector< SDOperand > &  Ops 
)

Definition at line 1752 of file SelectionDAG.cpp.

References llvm::ISD::AND, E, llvm::ISD::EXTLOAD, llvm::MVT::Flag, getLoad(), getNode(), llvm::SDOperand::getOperand(), llvm::MVT::getSizeInBits(), llvm::MVT::getVectorBaseType(), llvm::MVT::i1, llvm::MVT::isInteger(), llvm::MVT::isVector(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA_PARTS, llvm::ISD::SRL_PARTS, and llvm::ISD::ZEXTLOAD.

SDOperand llvm::SelectionDAG::getSetCC ( MVT::ValueType  VT,
SDOperand  LHS,
SDOperand  RHS,
ISD::CondCode  Cond 
) [inline]

getSetCC - Helper function to make it easier to build SetCC's if you just have an ISD::CondCode instead of an SDOperand.

Definition at line 236 of file SelectionDAG.h.

References getCondCode(), getNode(), and llvm::ISD::SETCC.

Referenced by llvm::IA64TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerOperation(), LowerSETCC(), llvm::SelectionDAGLowering::visitCast(), llvm::SelectionDAGLowering::visitIntrinsicCall(), llvm::SelectionDAGLowering::visitSetCC(), llvm::SelectionDAGLowering::visitSwitch(), and llvm::SelectionDAGLowering::visitSwitchCase().

SDOperand llvm::SelectionDAG::getSelectCC ( SDOperand  LHS,
SDOperand  RHS,
SDOperand  True,
SDOperand  False,
ISD::CondCode  Cond 
) [inline]

getSelectCC - Helper function to make it easier to build SelectCC's if you just have an ISD::CondCode instead of an SDOperand.

Definition at line 244 of file SelectionDAG.h.

References False, getCondCode(), getNode(), llvm::ISD::SELECT_CC, and True.

Referenced by LowerSRA().

SDOperand SelectionDAG::getVAArg ( MVT::ValueType  VT,
SDOperand  Chain,
SDOperand  Ptr,
SDOperand  SV 
)

getVAArg - VAArg produces a result and token chain, and takes a pointer and a source value as input.

Definition at line 1673 of file SelectionDAG.cpp.

References getNode(), llvm::MVT::Other, and llvm::ISD::VAARG.

Referenced by llvm::SelectionDAGLowering::visitVAArg().

SDOperand SelectionDAG::getLoad ( MVT::ValueType  VT,
SDOperand  Chain,
SDOperand  Ptr,
SDOperand  SV 
)

getLoad - Loads are not normal binary operators: their result type is not determined by their operands, and they produce a value AND a token chain.

Definition at line 1618 of file SelectionDAG.cpp.

References llvm::ISD::LOAD, and llvm::MVT::Other.

Referenced by llvm::SelectionDAGLowering::getLoadFrom(), getNode(), llvm::IA64TargetLowering::LowerArguments(), LowerCALL(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), llvm::X86TargetLowering::LowerFrameReturnAddress(), LowerGlobalAddress(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerSCALAR_TO_VECTOR(), LowerSINT_TO_FP(), PerformShuffleCombine(), llvm::SelectionDAGLowering::visitJumpTable(), and llvm::SelectionDAGLowering::visitMemIntrinsic().

SDOperand SelectionDAG::getVecLoad ( unsigned  Count,
MVT::ValueType  VT,
SDOperand  Chain,
SDOperand  Ptr,
SDOperand  SV 
)

Definition at line 1631 of file SelectionDAG.cpp.

References getConstant(), getNode(), getValueType(), llvm::MVT::i32, llvm::MVT::Other, llvm::MVT::Vector, and llvm::ISD::VLOAD.

Referenced by llvm::SelectionDAGLowering::getLoadFrom().

SDOperand SelectionDAG::getExtLoad ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Chain,
SDOperand  Ptr,
SDOperand  SV,
MVT::ValueType  EVT 
)

Definition at line 1647 of file SelectionDAG.cpp.

References getNode(), getValueType(), and llvm::MVT::Other.

Referenced by llvm::AlphaTargetLowering::LowerOperation().

SDOperand SelectionDAG::getSrcValue ( const Value I,
int  offset = 0 
)

Definition at line 1662 of file SelectionDAG.cpp.

References V.

Referenced by llvm::IA64TargetLowering::LowerArguments(), LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), LowerFORMAL_ARGUMENT(), LowerFORMAL_ARGUMENTS(), llvm::X86TargetLowering::LowerFrameReturnAddress(), LowerGlobalAddress(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerSCALAR_TO_VECTOR(), LowerSINT_TO_FP(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitLoad(), llvm::SelectionDAGLowering::visitMemIntrinsic(), llvm::SelectionDAGLowering::visitStore(), llvm::SelectionDAGLowering::visitVAArg(), llvm::SelectionDAGLowering::visitVACopy(), llvm::SelectionDAGLowering::visitVAEnd(), and llvm::SelectionDAGLowering::visitVAStart().

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
SDOperand  Op 
)

UpdateNodeOperands - *Mutate* the specified node in-place to have the specified operands. If the resultant node already exists in the DAG, this does not modify the specified node, instead it returns the node that already exists. If the resultant node does not exist in the DAG, the input node is returned. As a degenerate case, if you specify the same input operands as the node already has, the input node is returned.

Definition at line 1861 of file SelectionDAG.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), Op, llvm::SDOperand::ResNo, llvm::Use::Val, and llvm::SDOperand::Val.

Referenced by UpdateNodeOperands().

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 1888 of file SelectionDAG.cpp.

References llvm::SDNode::addUser(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDNode::removeUser(), llvm::SDOperand::ResNo, and llvm::SDOperand::Val.

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3 
)

Definition at line 1924 of file SelectionDAG.cpp.

References UpdateNodeOperands().

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4 
)

Definition at line 1933 of file SelectionDAG.cpp.

References UpdateNodeOperands().

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 1944 of file SelectionDAG.cpp.

References UpdateNodeOperands().

SDOperand SelectionDAG::UpdateNodeOperands ( SDOperand  N,
const std::vector< SDOperand > &  Op 
)

Definition at line 1957 of file SelectionDAG.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDOperand::ResNo, and llvm::SDOperand::Val.

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT 
)

SelectNodeTo - These are used for target selectors to *mutate* the specified node to have the specified return type, Target opcode, and operands. Note that target opcodes are stored as ISD::BUILTIN_OP_END+TargetOpcode in the node opcode field. The 0th value of the resultant node is returned.

Definition at line 2009 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1 
)

Definition at line 2024 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 2040 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3 
)

Definition at line 2057 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4 
)

Definition at line 2076 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 2097 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6 
)

Definition at line 2118 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7 
)

Definition at line 2139 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7,
SDOperand  Op8 
)

Definition at line 2161 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), llvm::SDNode::setOperands(), and llvm::SDNode::setValueTypes().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 2184 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), and llvm::SDNode::setOperands().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3 
)

Definition at line 2205 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), and llvm::SDNode::setOperands().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4 
)

Definition at line 2227 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), and llvm::SDNode::setOperands().

SDOperand SelectionDAG::SelectNodeTo ( SDNode N,
unsigned  TargetOpc,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 2250 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, llvm::SDNode::MorphNodeTo(), and llvm::SDNode::setOperands().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT 
)

getTargetNode - These are used for target selectors to create a new node with specified return type(s), target opcode, and operands.

Note that getTargetNode returns the resultant node. If there is already a node of the specified opcode and operands, it returns that node instead of the current one.

Definition at line 2280 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1 
)

Definition at line 2283 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 2287 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3 
)

Definition at line 2291 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4 
)

Definition at line 2295 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 2300 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6 
)

Definition at line 2305 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7 
)

Definition at line 2318 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7,
SDOperand  Op8 
)

Definition at line 2333 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT,
std::vector< SDOperand > &  Ops 
)

Definition at line 2349 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1 
)

Definition at line 2353 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 2362 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3 
)

Definition at line 2372 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4 
)

Definition at line 2384 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 2397 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6 
)

Definition at line 2411 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7 
)

Definition at line 2427 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
MVT::ValueType  VT3,
SDOperand  Op1,
SDOperand  Op2 
)

Definition at line 2444 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
MVT::ValueType  VT3,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5 
)

Definition at line 2456 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
MVT::ValueType  VT3,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6 
)

Definition at line 2472 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
MVT::ValueType  VT3,
SDOperand  Op1,
SDOperand  Op2,
SDOperand  Op3,
SDOperand  Op4,
SDOperand  Op5,
SDOperand  Op6,
SDOperand  Op7 
)

Definition at line 2490 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
MVT::ValueType  VT1,
MVT::ValueType  VT2,
std::vector< SDOperand > &  Ops 
)

Definition at line 2509 of file SelectionDAG.cpp.

References llvm::ISD::BUILTIN_OP_END, getNode(), and llvm::SDOperand::Val.

void SelectionDAG::ReplaceAllUsesWith ( SDOperand  From,
SDOperand  Op,
std::vector< SDNode * > *  Deleted = 0 
)

ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG. Use the first version if 'From' is known to have a single result, use the second if you have two nodes with identical results, use the third otherwise.

These methods all take an optional vector, which (if not null) is populated with any nodes that are deleted from the SelectionDAG, due to new equivalences that are discovered.

Definition at line 2522 of file SelectionDAG.cpp.

References E, llvm::SDNode::getNumValues(), llvm::SDNode::removeUser(), U, llvm::SDNode::use_begin(), llvm::SDNode::use_empty(), and llvm::SDOperand::Val.

Referenced by ReplaceAllUsesOfValueWith(), and ReplaceAllUsesWith().

void SelectionDAG::ReplaceAllUsesWith ( SDNode From,
SDNode To,
std::vector< SDNode * > *  Deleted = 0 
)

ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG.

This version assumes From/To have matching types and numbers of result values.

Definition at line 2561 of file SelectionDAG.cpp.

References llvm::SDNode::addUser(), E, llvm::SDNode::getNumValues(), llvm::SDNode::removeUser(), ReplaceAllUsesWith(), U, llvm::SDNode::use_begin(), and llvm::SDNode::use_empty().

void SelectionDAG::ReplaceAllUsesWith ( SDNode From,
const std::vector< SDOperand > &  To,
std::vector< SDNode * > *  Deleted = 0 
)

ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG.

This version can replace From with any result values. To must match the number and types of values returned by From.

Definition at line 2602 of file SelectionDAG.cpp.

References llvm::SDNode::addUser(), E, llvm::SDNode::getNumValues(), llvm::SDNode::removeUser(), ReplaceAllUsesWith(), U, llvm::SDNode::use_begin(), llvm::SDNode::use_empty(), and llvm::SDOperand::Val.

void SelectionDAG::ReplaceAllUsesOfValueWith ( SDOperand  From,
SDOperand  To,
std::vector< SDNode * > &  Deleted 
)

ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving uses of other values produced by From.Val alone. The Deleted vector is handled the same was as for ReplaceAllUsesWith, but it is required for this method.

Definition at line 2643 of file SelectionDAG.cpp.

References llvm::SDNode::addUser(), E, llvm::SDNode::getNumValues(), NumDeleted, Op, llvm::SDNode::removeUser(), ReplaceAllUsesWith(), llvm::SDNode::use_begin(), llvm::SDNode::use_end(), Users, and llvm::SDOperand::Val.

void SelectionDAG::DeleteNode ( SDNode N  ) 

DeleteNode - Remove the specified node from the system. This node must have no referrers.

Definition at line 328 of file SelectionDAG.cpp.

References llvm::SDNode::use_empty().

void SelectionDAG::dump (  )  const

Definition at line 3078 of file SelectionDAG.cpp.

References allnodes_begin(), allnodes_end(), DumpNodes(), E, getRoot(), and Val.

void SelectionDAG::InsertISelMapEntry ( std::map< SDOperand, SDOperand > &  Map,
SDNode Key,
unsigned  KeyResNo,
SDNode Element,
unsigned  ElementResNo 
) [static]

InsertISelMapEntry - A helper function to insert a key / element pair into a SDOperand to SDOperand map. This is added to avoid the map insertion operator from being inlined.

Definition at line 3100 of file SelectionDAG.cpp.

void SelectionDAG::InsertInFlightSetEntry ( std::set< SDNode * > &  Set,
SDNode N 
) [static]

InsertInFlightSetEntry - A helper function to insert a SDNode* to a SDNode* set. This is added to avoid the set insertion operator from being inlined.

Definition at line 3110 of file SelectionDAG.cpp.

void SelectionDAG::RemoveInFlightSetEntry ( std::set< SDNode * > &  Set,
SDNode N 
) [static]

RemoveInFlightSetEntry - A helper function to remove a SDNode* from a SDNode* set. This is added to avoid the set removal operator from being inlined.

Definition at line 3117 of file SelectionDAG.cpp.


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