LLVM API Documentation

llvm::SelectionDAG Class Reference

#include <SelectionDAG.h>

Collaboration diagram for llvm::SelectionDAG:
[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, FunctionLoweringInfo &fli)
 ~SelectionDAG ()
void init (MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw)
void clear ()
MachineFunction & getMachineFunction () const
const TargetMachine & getTarget () const
TargetLowering & getTargetLoweringInfo () const
FunctionLoweringInfo & getFunctionLoweringInfo () const
MachineModuleInfo * getMachineModuleInfo () const
DwarfWriter * getDwarfWriter () const
LLVMContext * getContext () const
void viewGraph (const std::string &Title)
void viewGraph ()
void clearGraphAttrs ()
void setGraphAttrs (const SDNode *N, const char *Attrs)
const std::string getGraphAttrs (const SDNode *N) const
void setGraphColor (const SDNode *N, const char *Color)
void setSubgraphColor (SDNode *N, const char *Color)
allnodes_const_iterator allnodes_begin () const
allnodes_const_iterator allnodes_end () const
allnodes_iterator allnodes_begin ()
allnodes_iterator allnodes_end ()
ilist< SDNode >::size_type allnodes_size () const
const SDValue & getRoot () const
SDValue getEntryNode () const
const SDValue & setRoot (SDValue N)
void Combine (CombineLevel Level, AliasAnalysis &AA, CodeGenOpt::Level OptLevel)
bool LegalizeTypes ()
void Legalize (bool TypesNeedLegalizing, CodeGenOpt::Level OptLevel)
bool LegalizeVectors ()
void RemoveDeadNodes ()
void DeleteNode (SDNode *N)
SDVTList getVTList (EVT VT)
SDVTList getVTList (EVT VT1, EVT VT2)
SDVTList getVTList (EVT VT1, EVT VT2, EVT VT3)
SDVTList getVTList (EVT VT1, EVT VT2, EVT VT3, EVT VT4)
SDVTList getVTList (const EVT *VTs, unsigned NumVTs)
SDValue getConstant (uint64_t Val, EVT VT, bool isTarget=false)
SDValue getConstant (const APInt &Val, EVT VT, bool isTarget=false)
SDValue getConstant (const ConstantInt &Val, EVT VT, bool isTarget=false)
SDValue getIntPtrConstant (uint64_t Val, bool isTarget=false)
SDValue getTargetConstant (uint64_t Val, EVT VT)
SDValue getTargetConstant (const APInt &Val, EVT VT)
SDValue getTargetConstant (const ConstantInt &Val, EVT VT)
SDValue getConstantFP (double Val, EVT VT, bool isTarget=false)
SDValue getConstantFP (const APFloat &Val, EVT VT, bool isTarget=false)
SDValue getConstantFP (const ConstantFP &CF, EVT VT, bool isTarget=false)
SDValue getTargetConstantFP (double Val, EVT VT)
SDValue getTargetConstantFP (const APFloat &Val, EVT VT)
SDValue getTargetConstantFP (const ConstantFP &Val, EVT VT)
SDValue getGlobalAddress (const GlobalValue *GV, EVT VT, int64_t offset=0, bool isTargetGA=false, unsigned char TargetFlags=0)
SDValue getTargetGlobalAddress (const GlobalValue *GV, EVT VT, int64_t offset=0, unsigned char TargetFlags=0)
SDValue getFrameIndex (int FI, EVT VT, bool isTarget=false)
SDValue getTargetFrameIndex (int FI, EVT VT)
SDValue getJumpTable (int JTI, EVT VT, bool isTarget=false, unsigned char TargetFlags=0)
SDValue getTargetJumpTable (int JTI, EVT VT, unsigned char TargetFlags=0)
SDValue getConstantPool (Constant *C, EVT VT, unsigned Align=0, int Offs=0, bool isT=false, unsigned char TargetFlags=0)
SDValue getTargetConstantPool (Constant *C, EVT VT, unsigned Align=0, int Offset=0, unsigned char TargetFlags=0)
SDValue getConstantPool (MachineConstantPoolValue *C, EVT VT, unsigned Align=0, int Offs=0, bool isT=false, unsigned char TargetFlags=0)
SDValue getTargetConstantPool (MachineConstantPoolValue *C, EVT VT, unsigned Align=0, int Offset=0, unsigned char TargetFlags=0)
SDValue getBasicBlock (MachineBasicBlock *MBB)
SDValue getBasicBlock (MachineBasicBlock *MBB, DebugLoc dl)
SDValue getExternalSymbol (const char *Sym, EVT VT)
SDValue getExternalSymbol (const char *Sym, DebugLoc dl, EVT VT)
SDValue getTargetExternalSymbol (const char *Sym, EVT VT, unsigned char TargetFlags=0)
SDValue getValueType (EVT)
SDValue getRegister (unsigned Reg, EVT VT)
SDValue getDbgStopPoint (DebugLoc DL, SDValue Root, unsigned Line, unsigned Col, Value *CU)
SDValue getLabel (unsigned Opcode, DebugLoc dl, SDValue Root, unsigned LabelID)
SDValue getCopyToReg (SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N)
SDValue getCopyToReg (SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N, SDValue Flag)
SDValue getCopyToReg (SDValue Chain, DebugLoc dl, SDValue Reg, SDValue N, SDValue Flag)
SDValue getCopyFromReg (SDValue Chain, DebugLoc dl, unsigned Reg, EVT VT)
SDValue getCopyFromReg (SDValue Chain, DebugLoc dl, unsigned Reg, EVT VT, SDValue Flag)
SDValue getCondCode (ISD::CondCode Cond)
SDValue getConvertRndSat (EVT VT, DebugLoc dl, SDValue Val, SDValue DTy, SDValue STy, SDValue Rnd, SDValue Sat, ISD::CvtCode Code)
SDValue getVectorShuffle (EVT VT, DebugLoc dl, SDValue N1, SDValue N2, const int *MaskElts)
SDValue getZeroExtendInReg (SDValue Op, DebugLoc DL, EVT SrcTy)
SDValue getNOT (DebugLoc DL, SDValue Val, EVT VT)
 getNOT - Create a bitwise NOT operation as (XOR Val, -1).
SDValue getCALLSEQ_START (SDValue Chain, SDValue Op)
SDValue getCALLSEQ_END (SDValue Chain, SDValue Op1, SDValue Op2, SDValue InFlag)
SDValue getUNDEF (EVT VT)
 getUNDEF - Return an UNDEF node. UNDEF does not have a useful DebugLoc.
SDValue getGLOBAL_OFFSET_TABLE (EVT VT)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, SDValue N)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, SDValue N1, SDValue N2)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, SDValue N1, SDValue N2, SDValue N3)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, SDValue N1, SDValue N2, SDValue N3, SDValue N4)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, SDValue N1, SDValue N2, SDValue N3, SDValue N4, SDValue N5)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, const SDUse *Ops, unsigned NumOps)
SDValue getNode (unsigned Opcode, DebugLoc DL, EVT VT, const SDValue *Ops, unsigned NumOps)
SDValue getNode (unsigned Opcode, DebugLoc DL, const std::vector< EVT > &ResultTys, const SDValue *Ops, unsigned NumOps)
SDValue getNode (unsigned Opcode, DebugLoc DL, const EVT *VTs, unsigned NumVTs, const SDValue *Ops, unsigned NumOps)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, const SDValue *Ops, unsigned NumOps)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, SDValue N)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, SDValue N1, SDValue N2)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, SDValue N1, SDValue N2, SDValue N3)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, SDValue N1, SDValue N2, SDValue N3, SDValue N4)
SDValue getNode (unsigned Opcode, DebugLoc DL, SDVTList VTs, SDValue N1, SDValue N2, SDValue N3, SDValue N4, SDValue N5)
SDValue getStackArgumentTokenFactor (SDValue Chain)
SDValue getMemcpy (SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool AlwaysInline, const Value *DstSV, uint64_t DstSVOff, const Value *SrcSV, uint64_t SrcSVOff)
SDValue getMemmove (SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, const Value *DstSV, uint64_t DstOSVff, const Value *SrcSV, uint64_t SrcSVOff)
SDValue getMemset (SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, const Value *DstSV, uint64_t DstSVOff)
SDValue getSetCC (DebugLoc DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
SDValue getVSetCC (DebugLoc DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
SDValue getSelectCC (DebugLoc DL, SDValue LHS, SDValue RHS, SDValue True, SDValue False, ISD::CondCode Cond)
SDValue getVAArg (EVT VT, DebugLoc dl, SDValue Chain, SDValue Ptr, SDValue SV)
SDValue getAtomic (unsigned Opcode, DebugLoc dl, EVT MemVT, SDValue Chain, SDValue Ptr, SDValue Cmp, SDValue Swp, const Value *PtrVal, unsigned Alignment=0)
SDValue getAtomic (unsigned Opcode, DebugLoc dl, EVT MemVT, SDValue Chain, SDValue Ptr, SDValue Val, const Value *PtrVal, unsigned Alignment=0)
SDValue getMemIntrinsicNode (unsigned Opcode, DebugLoc dl, const EVT *VTs, unsigned NumVTs, const SDValue *Ops, unsigned NumOps, EVT MemVT, const Value *srcValue, int SVOff, unsigned Align=0, bool Vol=false, bool ReadMem=true, bool WriteMem=true)
SDValue getMemIntrinsicNode (unsigned Opcode, DebugLoc dl, SDVTList VTList, const SDValue *Ops, unsigned NumOps, EVT MemVT, const Value *srcValue, int SVOff, unsigned Align=0, bool Vol=false, bool ReadMem=true, bool WriteMem=true)
SDValue getMergeValues (const SDValue *Ops, unsigned NumOps, DebugLoc dl)
 getMergeValues - Create a MERGE_VALUES node from the given operands.
SDValue getLoad (EVT VT, DebugLoc dl, SDValue Chain, SDValue Ptr, const Value *SV, int SVOffset, bool isVolatile=false, unsigned Alignment=0)
SDValue getExtLoad (ISD::LoadExtType ExtType, DebugLoc dl, EVT VT, SDValue Chain, SDValue Ptr, const Value *SV, int SVOffset, EVT EVT, bool isVolatile=false, unsigned Alignment=0)
SDValue getIndexedLoad (SDValue OrigLoad, DebugLoc dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)
SDValue getLoad (ISD::MemIndexedMode AM, DebugLoc dl, ISD::LoadExtType ExtType, EVT VT, SDValue Chain, SDValue Ptr, SDValue Offset, const Value *SV, int SVOffset, EVT EVT, bool isVolatile=false, unsigned Alignment=0)
SDValue getStore (SDValue Chain, DebugLoc dl, SDValue Val, SDValue Ptr, const Value *SV, int SVOffset, bool isVolatile=false, unsigned Alignment=0)
SDValue getTruncStore (SDValue Chain, DebugLoc dl, SDValue Val, SDValue Ptr, const Value *SV, int SVOffset, EVT TVT, bool isVolatile=false, unsigned Alignment=0)
SDValue getIndexedStore (SDValue OrigStoe, DebugLoc dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)
SDValue getSrcValue (const Value *v)
 getSrcValue - Construct a node to track a Value* through the backend.
SDValue getMemOperand (const MachineMemOperand &MO)
SDValue getShiftAmountOperand (SDValue Op)
SDValue UpdateNodeOperands (SDValue N, SDValue Op)
SDValue UpdateNodeOperands (SDValue N, SDValue Op1, SDValue Op2)
SDValue UpdateNodeOperands (SDValue N, SDValue Op1, SDValue Op2, SDValue Op3)
SDValue UpdateNodeOperands (SDValue N, SDValue Op1, SDValue Op2, SDValue Op3, SDValue Op4)
SDValue UpdateNodeOperands (SDValue N, SDValue Op1, SDValue Op2, SDValue Op3, SDValue Op4, SDValue Op5)
SDValue UpdateNodeOperands (SDValue N, const SDValue *Ops, unsigned NumOps)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT, SDValue Op1)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT, SDValue Op1, SDValue Op2)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT, const SDValue *Ops, unsigned NumOps)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, const SDValue *Ops, unsigned NumOps)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, EVT VT3, const SDValue *Ops, unsigned NumOps)
SDNode * SelectNodeTo (SDNode *N, unsigned MachineOpc, EVT VT1, EVT VT2, EVT VT3, EVT VT4, const SDValue *Ops, unsigned NumOps)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, SDValue Op1)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2, EVT VT3, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * SelectNodeTo (SDNode *N, unsigned TargetOpc, SDVTList VTs, const SDValue *Ops, unsigned NumOps)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT, SDValue Op1)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT, SDValue Op1, SDValue Op2)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT, const SDValue *Ops, unsigned NumOps)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2, const SDValue *Ops, unsigned NumOps)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2, EVT VT3, const SDValue *Ops, unsigned NumOps)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2, SDValue Op1)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * MorphNodeTo (SDNode *N, unsigned Opc, SDVTList VTs, const SDValue *Ops, unsigned NumOps)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT, SDValue Op1)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT, SDValue Op1, SDValue Op2)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT, const SDValue *Ops, unsigned NumOps)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, SDValue Op1)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, const SDValue *Ops, unsigned NumOps)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, EVT VT3, SDValue Op1, SDValue Op2)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, EVT VT3, SDValue Op1, SDValue Op2, SDValue Op3)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, EVT VT3, const SDValue *Ops, unsigned NumOps)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, EVT VT1, EVT VT2, EVT VT3, EVT VT4, const SDValue *Ops, unsigned NumOps)
SDNode * getTargetNode (unsigned Opcode, DebugLoc dl, const std::vector< EVT > &ResultTys, const SDValue *Ops, unsigned NumOps)
SDValue getTargetExtractSubreg (int SRIdx, DebugLoc DL, EVT VT, SDValue Operand)
SDNode * getNodeIfExists (unsigned Opcode, SDVTList VTs, const SDValue *Ops, unsigned NumOps)
void RemoveDeadNode (SDNode *N, DAGUpdateListener *UpdateListener=0)
void RemoveDeadNodes (SmallVectorImpl< SDNode * > &DeadNodes, DAGUpdateListener *UpdateListener=0)
void ReplaceAllUsesWith (SDValue From, SDValue Op, DAGUpdateListener *UpdateListener=0)
void ReplaceAllUsesWith (SDNode *From, SDNode *To, DAGUpdateListener *UpdateListener=0)
void ReplaceAllUsesWith (SDNode *From, const SDValue *To, DAGUpdateListener *UpdateListener=0)
void ReplaceAllUsesOfValueWith (SDValue From, SDValue To, DAGUpdateListener *UpdateListener=0)
void ReplaceAllUsesOfValuesWith (const SDValue *From, const SDValue *To, unsigned Num, DAGUpdateListener *UpdateListener=0)
unsigned AssignTopologicalOrder ()
void RepositionNode (allnodes_iterator Position, SDNode *N)
void dump () const
SDValue CreateStackTemporary (EVT VT, unsigned minAlign=1)
SDValue CreateStackTemporary (EVT VT1, EVT VT2)
SDValue FoldConstantArithmetic (unsigned Opcode, EVT VT, ConstantSDNode *Cst1, ConstantSDNode *Cst2)
 FoldConstantArithmetic -.
SDValue FoldSetCC (EVT VT, SDValue N1, SDValue N2, ISD::CondCode Cond, DebugLoc dl)
 FoldSetCC - Constant fold a setcc to true or false.
bool SignBitIsZero (SDValue Op, unsigned Depth=0) const
bool MaskedValueIsZero (SDValue Op, const APInt &Mask, unsigned Depth=0) const
void ComputeMaskedBits (SDValue Op, const APInt &Mask, APInt &KnownZero, APInt &KnownOne, unsigned Depth=0) const
unsigned ComputeNumSignBits (SDValue Op, unsigned Depth=0) const
bool isVerifiedDebugInfoDesc (SDValue Op) const
SDValue getShuffleScalarElt (const ShuffleVectorSDNode *N, unsigned Idx)

Static Public Member Functions

static bool isCommutativeBinOp (unsigned Opcode)

Public Attributes

std::map< const SDNode
*, std::string > 
NodeGraphAttrs

Classes

class  DAGUpdateListener


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 75 of file SelectionDAG.h.


Member Typedef Documentation

Definition at line 173 of file SelectionDAG.h.

Definition at line 176 of file SelectionDAG.h.


Constructor & Destructor Documentation

SelectionDAG::SelectionDAG ( TargetLowering &  tli,
FunctionLoweringInfo &  fli 
)

Definition at line 799 of file SelectionDAG.cpp.

SelectionDAG::~SelectionDAG (  ) 

Definition at line 814 of file SelectionDAG.cpp.


Member Function Documentation

void SelectionDAG::init ( MachineFunction &  mf,
MachineModuleInfo *  mmi,
DwarfWriter *  dw 
)

init - Prepare this SelectionDAG to process code in the given MachineFunction.

Definition at line 806 of file SelectionDAG.cpp.

References llvm::Function::getContext(), and llvm::MachineFunction::getFunction().

Referenced by llvm::SelectionDAGISel::runOnMachineFunction().

void SelectionDAG::clear (  ) 

clear - Clear state and free memory necessary to make this SelectionDAG ready to process a new block.

Definition at line 825 of file SelectionDAG.cpp.

References getEntryNode(), llvm::BumpPtrAllocator::Reset(), and llvm::SDNode::UseList.

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

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

const TargetMachine & SelectionDAG::getTarget (  )  const

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

FunctionLoweringInfo& llvm::SelectionDAG::getFunctionLoweringInfo (  )  const [inline]

Definition at line 139 of file SelectionDAG.h.

Referenced by llvm::RegsForValue::getCopyFromRegs().

MachineModuleInfo* llvm::SelectionDAG::getMachineModuleInfo (  )  const [inline]

DwarfWriter* llvm::SelectionDAG::getDwarfWriter (  )  const [inline]

Definition at line 141 of file SelectionDAG.h.

LLVMContext* llvm::SelectionDAG::getContext (  )  const [inline]

void SelectionDAG::viewGraph ( const std::string &  Title  ) 

viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.

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

Definition at line 138 of file SelectionDAGPrinter.cpp.

References llvm::cerr(), getMachineFunction(), and llvm::ViewGraph().

void SelectionDAG::viewGraph (  ) 

Definition at line 151 of file SelectionDAGPrinter.cpp.

void SelectionDAG::clearGraphAttrs (  ) 

clearGraphAttrs - Clear all previously defined node graph attributes. Intended to be used from a debugging tool (eg. gdb).

clearGraphAttrs - Clear all previously defined node graph attributes. Intended to be used from a debugging tool (eg. gdb).

Definition at line 157 of file SelectionDAGPrinter.cpp.

References llvm::cerr(), and NodeGraphAttrs.

void SelectionDAG::setGraphAttrs ( const SDNode *  N,
const char *  Attrs 
)

setGraphAttrs - Set graph attributes for a node. (eg. "color=red".)

Definition at line 169 of file SelectionDAGPrinter.cpp.

References llvm::cerr(), and NodeGraphAttrs.

const std::string SelectionDAG::getGraphAttrs ( const SDNode *  N  )  const

getGraphAttrs - Get graph attributes for a node. (eg. "color=red".) Used from getNodeAttributes.

getGraphAttrs - Get graph attributes for a node. (eg. "color=red".) Used from getNodeAttributes.

Definition at line 181 of file SelectionDAGPrinter.cpp.

References llvm::cerr(), and NodeGraphAttrs.

Referenced by llvm::DOTGraphTraits< SelectionDAG * >::getNodeAttributes().

void SelectionDAG::setGraphColor ( const SDNode *  N,
const char *  Color 
)

setGraphColor - Convenience for setting node color attribute.

Definition at line 199 of file SelectionDAGPrinter.cpp.

References llvm::cerr(), and NodeGraphAttrs.

void SelectionDAG::setSubgraphColor ( SDNode *  N,
const char *  Color 
)

setGraphColor - Convenience for setting subgraph color attribute.

setSubgraphColor - Convenience for setting subgraph color attribute.

Definition at line 243 of file SelectionDAGPrinter.cpp.

References llvm::cerr().

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

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

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

Definition at line 177 of file SelectionDAG.h.

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

Definition at line 178 of file SelectionDAG.h.

ilist<SDNode>::size_type llvm::SelectionDAG::allnodes_size (  )  const [inline]

Definition at line 179 of file SelectionDAG.h.

Referenced by AssignTopologicalOrder().

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

SDValue llvm::SelectionDAG::getEntryNode (  )  const [inline]

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

void SelectionDAG::Combine ( CombineLevel  Level,
AliasAnalysis &  AA,
CodeGenOpt::Level  OptLevel 
)

Combine - This iterates over the nodes in the SelectionDAG, folding certain types of nodes together, or eliminating superfluous nodes. The Level argument controls whether Combine is allowed to produce nodes and types that are illegal on the target.

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

Definition at line 6255 of file DAGCombiner.cpp.

bool SelectionDAG::LegalizeTypes (  ) 

LegalizeTypes - This transforms the SelectionDAG into a SelectionDAG that only uses types natively supported by the target. Returns "true" if it made any changes.

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

LegalizeTypes - This transforms the SelectionDAG into a SelectionDAG that only uses types natively supported by the target. Returns "true" if it made any changes.

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

Definition at line 1087 of file LegalizeTypes.cpp.

void SelectionDAG::Legalize ( bool  TypesNeedLegalizing,
CodeGenOpt::Level  OptLevel 
)

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 3074 of file LegalizeDAG.cpp.

bool SelectionDAG::LegalizeVectors (  ) 

LegalizeVectors - This transforms the SelectionDAG into a SelectionDAG that only uses vector math operations supported by the target. This is necessary as a separate step from Legalize because unrolling a vector operation can introduce illegal types, which requires running LegalizeTypes again.

This returns true if it made any changes; in that case, LegalizeTypes is called again before Legalize.

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

Definition at line 337 of file LegalizeVectorOps.cpp.

void SelectionDAG::RemoveDeadNodes (  ) 

RemoveDeadNodes - This method deletes all unreachable nodes in the SelectionDAG.

RemoveDeadNodes - This method deletes all unreachable nodes in the SelectionDAG.

Definition at line 529 of file SelectionDAG.cpp.

References allnodes_begin(), allnodes_end(), llvm::PIC16ISD::Dummy, E, getRoot(), llvm::HandleSDNode::getValue(), llvm::SmallVectorImpl< T >::push_back(), and setRoot().

Referenced by MorphNodeTo(), RemoveDeadNode(), and llvm::DAGTypeLegalizer::run().

void SelectionDAG::DeleteNode ( SDNode *  N  ) 

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

Definition at line 584 of file SelectionDAG.cpp.

SDVTList SelectionDAG::getVTList ( EVT  VT  ) 

getVTList - Return an SDVTList that represents the list of values specified.

Definition at line 4002 of file SelectionDAG.cpp.

References makeVTList().

Referenced by llvm::TargetLowering::BuildSDIV(), llvm::TargetLowering::BuildUDIV(), ExpandBIT_CONVERT(), llvm::PIC16TargetLowering::ExpandLoad(), GeneratePerfectShuffle(), getAtomic(), getBasicBlock(), getCALLSEQ_END(), getCALLSEQ_START(), getConstant(), getConstantFP(), getConstantPool(), getCopyFromReg(), llvm::RegsForValue::getCopyFromRegs(), getCopyToReg(), getFrameIndex(), getGlobalAddress(), getIndexedStore(), getJumpTable(), getLabel(), getLoad(), getMemOperand(), getMergeValues(), getNode(), llvm::PIC16TargetLowering::getPIC16Cmp(), getRegister(), getSrcValue(), getStore(), getTargetNode(), GetTLSADDR(), getTruncStore(), getVAArg(), getVectorShuffle(), getVTList(), llvm::PIC16TargetLowering::LowerADD(), LowerBR_CC(), llvm::SPUTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerLOAD(), llvm::PIC16TargetLowering::LowerReturn(), llvm::SystemZTargetLowering::LowerSELECT_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerShift(), llvm::PIC16TargetLowering::LowerSUB(), LowerVECTOR_SHUFFLE(), MorphNodeTo(), PerformShuffleCombine(), llvm::X86TargetLowering::ReplaceNodeResults(), and SelectNodeTo().

SDVTList SelectionDAG::getVTList ( EVT  VT1,
EVT  VT2 
)

Definition at line 4006 of file SelectionDAG.cpp.

References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().

SDVTList SelectionDAG::getVTList ( EVT  VT1,
EVT  VT2,
EVT  VT3 
)

Definition at line 4020 of file SelectionDAG.cpp.

References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().

SDVTList SelectionDAG::getVTList ( EVT  VT1,
EVT  VT2,
EVT  VT3,
EVT  VT4 
)

Definition at line 4036 of file SelectionDAG.cpp.

References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().

SDVTList SelectionDAG::getVTList ( const EVT *  VTs,
unsigned  NumVTs 
)

SDValue SelectionDAG::getConstant ( uint64_t  Val,
EVT  VT,
bool  isTarget = false 
)

Definition at line 860 of file SelectionDAG.cpp.

References llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), and llvm::EVT::isVector().

Referenced by BuildGetId(), BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), CreateCopyOfByValArgument(), llvm::SystemZTargetLowering::EmitCmp(), ExpandBIT_CONVERT(), ExpandConstantFP(), llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::PIC16TargetLowering::ExpandGlobalAddress(), llvm::PIC16TargetLowering::ExpandLoad(), llvm::PIC16TargetLowering::ExpandStore(), ExpandUnalignedLoad(), ExpandUnalignedStore(), FoldConstantArithmetic(), FoldSetCC(), GeneratePerfectShuffle(), getARMCmp(), getARMIndexedAddressParts(), getBorrowGenerateShufMask(), getCarryGenerateShufMask(), getConstant(), getCopyFromParts(), getCopyToParts(), GetExponent(), getIntPtrConstant(), getMemBasePlusOffset(), getMemsetStringVal(), getMemsetValue(), getNode(), getNOT(), llvm::PIC16TargetLowering::getPIC16Cmp(), GetSignificand(), getT2IndexedAddressParts(), getTargetConstant(), llvm::SelectionDAGLowering::getValue(), getVShift(), getZeroExtendInReg(), isBLACompatibleAddress(), isLSAAddress(), llvm::MSP430TargetLowering::LowerBR_CC(), LowerBR_CC(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), LowerConstantFP(), LowerConstantPool(), LowerCTPOP(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), LowerDYNAMIC_STACKALLOC(), LowerEXTRACT_VECTOR_ELT(), LowerFCOPYSIGN(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerI8Math(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerINSERT_VECTOR_ELT(), LowerJumpTable(), LowerLOAD(), LowerMemOpCallTo(), llvm::AlphaTargetLowering::LowerOperation(), llvm::PIC16TargetLowering::LowerReturn(), LowerSCALAR_TO_VECTOR(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), LowerSETCC(), LowerShift(), LowerSTORE(), LowerTRUNCATE(), llvm::SPU::LowerV2I64Splat(), LowerVAARG(), LowerVASTART(), LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLEv16i8(), LowerVECTOR_SHUFFLEv8i16(), PerformCMOVCombine(), llvm::SPUTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformIntrinsicCombine(), PerformMulCombine(), PerformSELECTCombine(), PerformShiftCombine(), PerformSTORECombine(), PrepareCall(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::TargetLowering::SimplifySetCC(), TranslateX86CC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().

SDValue SelectionDAG::getConstant ( const APInt &  Val,
EVT  VT,
bool  isTarget = false 
)

Definition at line 868 of file SelectionDAG.cpp.

References llvm::ConstantInt::get(), and getConstant().

SDValue SelectionDAG::getConstant ( const ConstantInt &  Val,
EVT  VT,
bool  isTarget = false 
)

SDValue SelectionDAG::getIntPtrConstant ( uint64_t  Val,
bool  isTarget = false 
)

SDValue llvm::SelectionDAG::getTargetConstant ( uint64_t  Val,
EVT  VT 
) [inline]

SDValue llvm::SelectionDAG::getTargetConstant ( const APInt &  Val,
EVT  VT 
) [inline]

Definition at line 263 of file SelectionDAG.h.

References getConstant().

SDValue llvm::SelectionDAG::getTargetConstant ( const ConstantInt &  Val,
EVT  VT 
) [inline]

Definition at line 266 of file SelectionDAG.h.

References getConstant().

SDValue SelectionDAG::getConstantFP ( double  Val,
EVT  VT,
bool  isTarget = false 
)

SDValue SelectionDAG::getConstantFP ( const APFloat &  Val,
EVT  VT,
bool  isTarget = false 
)

Definition at line 910 of file SelectionDAG.cpp.

References llvm::ConstantFP::get(), getConstantFP(), and getContext().

SDValue SelectionDAG::getConstantFP ( const ConstantFP &  CF,
EVT  VT,
bool  isTarget = false 
)

SDValue llvm::SelectionDAG::getTargetConstantFP ( double  Val,
EVT  VT 
) [inline]

Definition at line 272 of file SelectionDAG.h.

References getConstantFP().

Referenced by getZeroVector().

SDValue llvm::SelectionDAG::getTargetConstantFP ( const APFloat &  Val,
EVT  VT 
) [inline]

Definition at line 275 of file SelectionDAG.h.

References getConstantFP().

SDValue llvm::SelectionDAG::getTargetConstantFP ( const ConstantFP &  Val,
EVT  VT 
) [inline]

Definition at line 278 of file SelectionDAG.h.

References getConstantFP().

SDValue SelectionDAG::getGlobalAddress ( const GlobalValue *  GV,
EVT  VT,
int64_t  offset = 0,
bool  isTargetGA = false,
unsigned char  TargetFlags = 0 
)

SDValue llvm::SelectionDAG::getTargetGlobalAddress ( const GlobalValue *  GV,
EVT  VT,
int64_t  offset = 0,
unsigned char  TargetFlags = 0 
) [inline]

SDValue SelectionDAG::getFrameIndex ( int  FI,
EVT  VT,
bool  isTarget = false 
)

SDValue llvm::SelectionDAG::getTargetFrameIndex ( int  FI,
EVT  VT 
) [inline]

SDValue SelectionDAG::getJumpTable ( int  JTI,
EVT  VT,
bool  isTarget = false,
unsigned char  TargetFlags = 0 
)

SDValue llvm::SelectionDAG::getTargetJumpTable ( int  JTI,
EVT  VT,
unsigned char  TargetFlags = 0 
) [inline]

Definition at line 295 of file SelectionDAG.h.

References getJumpTable().

Referenced by llvm::SystemZTargetLowering::LowerJumpTable(), and LowerJumpTable().

SDValue SelectionDAG::getConstantPool ( Constant *  C,
EVT  VT,
unsigned  Align = 0,
int  Offs = 0,
bool  isT = false,
unsigned char  TargetFlags = 0 
)

SDValue llvm::SelectionDAG::getTargetConstantPool ( Constant *  C,
EVT  VT,
unsigned  Align = 0,
int  Offset = 0,
unsigned char  TargetFlags = 0 
) [inline]

SDValue SelectionDAG::getConstantPool ( MachineConstantPoolValue *  C,
EVT  VT,
unsigned  Align = 0,
int  Offs = 0,
bool  isT = false,
unsigned char  TargetFlags = 0 
)

SDValue llvm::SelectionDAG::getTargetConstantPool ( MachineConstantPoolValue *  C,
EVT  VT,
unsigned  Align = 0,
int  Offset = 0,
unsigned char  TargetFlags = 0 
) [inline]

Definition at line 309 of file SelectionDAG.h.

References Align, getConstantPool(), and Offset.

SDValue SelectionDAG::getBasicBlock ( MachineBasicBlock *  MBB  ) 

SDValue llvm::SelectionDAG::getBasicBlock ( MachineBasicBlock *  MBB,
DebugLoc  dl 
)

SDValue SelectionDAG::getExternalSymbol ( const char *  Sym,
EVT  VT 
)

SDValue llvm::SelectionDAG::getExternalSymbol ( const char *  Sym,
DebugLoc  dl,
EVT  VT 
)

SDValue SelectionDAG::getTargetExternalSymbol ( const char *  Sym,
EVT  VT,
unsigned char  TargetFlags = 0 
)

SDValue SelectionDAG::getValueType ( EVT  VT  ) 

SDValue SelectionDAG::getRegister ( unsigned  Reg,
EVT  VT 
)

SDValue SelectionDAG::getDbgStopPoint ( DebugLoc  DL,
SDValue  Root,
unsigned  Line,
unsigned  Col,
Value *  CU 
)

Definition at line 1288 of file SelectionDAG.cpp.

References llvm::SDNode::setDebugLoc().

SDValue SelectionDAG::getLabel ( unsigned  Opcode,
DebugLoc  dl,
SDValue  Root,
unsigned  LabelID 
)

SDValue llvm::SelectionDAG::getCopyToReg ( SDValue  Chain,
DebugLoc  dl,
unsigned  Reg,
SDValue  N 
) [inline]

SDValue llvm::SelectionDAG::getCopyToReg ( SDValue  Chain,
DebugLoc  dl,
unsigned  Reg,
SDValue  N,
SDValue  Flag 
) [inline]

SDValue llvm::SelectionDAG::getCopyToReg ( SDValue  Chain,
DebugLoc  dl,
SDValue  Reg,
SDValue  N,
SDValue  Flag 
) [inline]

SDValue llvm::SelectionDAG::getCopyFromReg ( SDValue  Chain,
DebugLoc  dl,
unsigned  Reg,
EVT  VT 
) [inline]

SDValue llvm::SelectionDAG::getCopyFromReg ( SDValue  Chain,
DebugLoc  dl,
unsigned  Reg,
EVT  VT,
SDValue  Flag 
) [inline]

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

Definition at line 1135 of file SelectionDAG.cpp.

Referenced by getSelectCC(), getSetCC(), and getVSetCC().

SDValue SelectionDAG::getConvertRndSat ( EVT  VT,
DebugLoc  dl,
SDValue  Val,
SDValue  DTy,
SDValue  STy,
SDValue  Rnd,
SDValue  Sat,
ISD::CvtCode  Code 
)

Returns the ConvertRndSat Note: Avoid using this node because it may disappear in the future and most targets don't support it.

Definition at line 1252 of file SelectionDAG.cpp.

References llvm::ISD::CVT_FF, llvm::ISD::CVT_SS, llvm::ISD::CVT_UU, and E.

SDValue SelectionDAG::getVectorShuffle ( EVT  VT,
DebugLoc  dl,
SDValue  N1,
SDValue  N2,
const int *  MaskElts 
)

SDValue SelectionDAG::getZeroExtendInReg ( SDValue  Op,
DebugLoc  DL,
EVT  SrcTy 
)

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

Definition at line 843 of file SelectionDAG.cpp.

References llvm::ISD::AND, getConstant(), llvm::APInt::getLowBitsSet(), getNode(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), and Imm.

SDValue SelectionDAG::getNOT ( DebugLoc  DL,
SDValue  Val,
EVT  VT 
)

getNOT - Create a bitwise NOT operation as (XOR Val, -1).

getNOT - Create a bitwise NOT operation as (XOR Val, -1).

Definition at line 853 of file SelectionDAG.cpp.

References llvm::APInt::getAllOnesValue(), getConstant(), getNode(), llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::isVector(), and llvm::ISD::XOR.

Referenced by LowerVSETCC(), and llvm::TargetLowering::SimplifySetCC().

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

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

Definition at line 393 of file SelectionDAG.h.

References llvm::ISD::CALLSEQ_START, llvm::MVT::Flag, getNode(), llvm::DebugLoc::getUnknownLoc(), getVTList(), and llvm::MVT::Other.

Referenced by llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), and llvm::PIC16TargetLowering::LowerCall().

SDValue llvm::SelectionDAG::getCALLSEQ_END ( SDValue  Chain,
SDValue  Op1,
SDValue  Op2,
SDValue  InFlag 
) [inline]

getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a flag result (to ensure it's not CSE'd). CALLSEQ_END does not have a useful DebugLoc.

Definition at line 403 of file SelectionDAG.h.

References llvm::ISD::CALLSEQ_END, llvm::MVT::Flag, llvm::SDValue::getNode(), getNode(), llvm::DebugLoc::getUnknownLoc(), getVTList(), llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().

Referenced by llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), and PrepareTailCall().

SDValue llvm::SelectionDAG::getUNDEF ( EVT  VT  )  [inline]

SDValue llvm::SelectionDAG::getGLOBAL_OFFSET_TABLE ( EVT  VT  )  [inline]

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT 
)

getNode - Gets or creates the specified node.

Definition at line 2246 of file SelectionDAG.cpp.

References AddNodeIDNode(), E, and getVTList().

Referenced by BuildGetId(), BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplat(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), BuildVSLDOI(), combineSelectAndUse(), combineShlAddConstant(), llvm::SystemZTargetLowering::EmitCmp(), EmitCMP(), ExpandBIT_CONVERT(), llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::PIC16TargetLowering::ExpandGlobalAddress(), llvm::PIC16TargetLowering::ExpandLoad(), llvm::PIC16TargetLowering::ExpandStore(), ExpandUnalignedLoad(), ExpandUnalignedStore(), GeneratePerfectShuffle(), getARMCmp(), getBorrowGenerateShufMask(), getCALLSEQ_END(), getCALLSEQ_START(), getCarryGenerateShufMask(), getConstant(), getConstantFP(), llvm::SelectionDAGLowering::getControlRoot(), getCopyFromParts(), getCopyFromReg(), llvm::RegsForValue::getCopyFromRegs(), getCopyToParts(), getCopyToReg(), llvm::RegsForValue::getCopyToRegs(), GetExponent(), getGLOBAL_OFFSET_TABLE(), getMemBasePlusOffset(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemset(), getMemsetStringVal(), getMemsetValue(), getMergeValues(), GetNegatedExpression(), getNode(), getNOT(), getOnesVector(), llvm::PIC16TargetLowering::getPIC16Cmp(), llvm::X86TargetLowering::getPICJumpTableRelocBase(), llvm::SelectionDAGLowering::GetRegistersForValue(), llvm::SelectionDAGLowering::getRoot(), getSelectCC(), getSetCC(), getShiftAmountOperand(), GetSignificand(), getStackArgumentTokenFactor(), getTargetNode(), GetTLSADDR(), getUNDEF(), getVAArg(), llvm::SelectionDAGLowering::getValue(), getVFPCmp(), getVSetCC(), getVShift(), getVZextMovL(), getZeroExtendInReg(), getZeroVector(), llvm::PIC16TargetLowering::LowerADD(), llvm::PIC16TargetLowering::LowerBinOp(), llvm::SystemZTargetLowering::LowerBR_CC(), llvm::PIC16TargetLowering::LowerBR_CC(), llvm::MSP430TargetLowering::LowerBR_CC(), LowerBR_CC(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), LowerByteImmed(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::AlphaTargetLowering::LowerCallResult(), llvm::TargetLowering::LowerCallTo(), LowerCONCAT_VECTORS(), LowerConstantFP(), llvm::SystemZTargetLowering::LowerConstantPool(), LowerCONSTANTPOOL(), LowerConstantPool(), LowerCTPOP(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), LowerDYNAMIC_STACKALLOC(), llvm::MSP430TargetLowering::LowerExternalSymbol(), LowerEXTRACT_VECTOR_ELT(), LowerFCOPYSIGN(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerFormalArguments(), LowerFP_TO_INT(), LowerFP_TO_SINT(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerGLOBALADDRESS(), llvm::MSP430TargetLowering::LowerGlobalAddress(), LowerI8Math(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerINSERT_VECTOR_ELT(), LowerINT_TO_FP(), llvm::SystemZTargetLowering::LowerJumpTable(), LowerJumpTable(), LowerLOAD(), LowerMemOpCallTo(), LowerNeonVLDIntrinsic(), LowerNeonVSTIntrinsic(), llvm::AlphaTargetLowering::LowerOperation(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), llvm::PIC16TargetLowering::LowerReturn(), LowerSCALAR_TO_VECTOR(), llvm::SystemZTargetLowering::LowerSELECT_CC(), llvm::PIC16TargetLowering::LowerSELECT_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), LowerSETCC(), LowerShift(), llvm::MSP430TargetLowering::LowerShifts(), llvm::MSP430TargetLowering::LowerSIGN_EXTEND(), LowerSINT_TO_FP(), LowerSTORE(), llvm::PIC16TargetLowering::LowerSUB(), LowerToTLSExecModel(), LowerToTLSGeneralDynamicModel32(), LowerTRUNCATE(), llvm::SPU::LowerV2I64Splat(), LowerVAARG(), LowerVASTART(), LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLEv16i8(), LowerVECTOR_SHUFFLEv8i16(), LowerVSETCC(), MoveBelowCallSeqStart(), PerformCMOVCombine(), llvm::SPUTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformExtendCombine(), PerformIntrinsicCombine(), PerformMulCombine(), PerformSELECTCombine(), PerformShiftCombine(), PerformShuffleCombine(), PerformSTORECombine(), PerformVZEXT_MOVLCombine(), PrepareCall(), PrepareTailCall(), PromoteSplat(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::BlackfinTargetLowering::ReplaceNodeResults(), RewriteAsNarrowerShuffle(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(), llvm::TargetLowering::SimplifySetCC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
SDValue  N 
)

Definition at line 2263 of file SelectionDAG.cpp.

References AddNodeIDNode(), llvm::ISD::ANY_EXTEND, llvm::lltok::APFloat, llvm::ISD::BIT_CONVERT, llvm::APFloat::bitcastToAPInt(), llvm::EVT::bitsGT(), llvm::EVT::bitsLE(), llvm::EVT::bitsLT(), llvm::APInt::bitsToDouble(), llvm::APInt::bitsToFloat(), llvm::ISD::BSWAP, llvm::APInt::byteSwap(), llvm::CallingConv::C, llvm::APFloat::changeSign(), llvm::APFloat::clearSign(), llvm::ISD::CONCAT_VECTORS, llvm::APFloat::convert(), llvm::APFloat::convertFromAPInt(), llvm::APFloat::convertToInteger(), llvm::APInt::countLeadingZeros(), llvm::APInt::countPopulation(), llvm::APInt::countTrailingZeros(), llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, E, EVTToAPFloatSemantics(), llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FABS, llvm::MVT::Flag, 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(), llvm::SDValue::getConstantOperandVal(), getNode(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::EVT::getSizeInBits(), getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), getVTList(), llvm::APInt::getZExtValue(), llvm::MVT::i32, llvm::MVT::i64, llvm::integerPartWidth, llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm_unreachable, llvm::ISD::MERGE_VALUES, llvm::APFloat::opInvalidOp, llvm::MVT::ppcf128, llvm::APFloat::rmNearestTiesToEven, llvm::APFloat::rmTowardZero, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::ISD::UNDEF, llvm::UnsafeFPMath, V, Val, VTs, zero, and llvm::ISD::ZERO_EXTEND.

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
SDValue  N1,
SDValue  N2 
)

Definition at line 2512 of file SelectionDAG.cpp.

References llvm::APFloat::add(), llvm::ISD::ADD, llvm::ISD::ADDC, llvm::ISD::ADDE, AddNodeIDNode(), llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::APInt::ashr(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::EVT::bitsLE(), llvm::ISD::BUILD_PAIR, llvm::ISD::BUILD_VECTOR, llvm::CallingConv::C, llvm::ISD::CONCAT_VECTORS, llvm::APFloat::copySign(), llvm::APFloat::divide(), llvm::dyn_cast(), E, llvm::ISD::EntryToken, llvm::ISD::EXTRACT_ELEMENT, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FADD, llvm::ISD::FCOPYSIGN, llvm::ISD::FDIV, llvm::MVT::Flag, llvm::ISD::FMUL, FoldConstantArithmetic(), llvm::ISD::FP_ROUND, llvm::ISD::FP_ROUND_INREG, llvm::ISD::FREM, llvm::ISD::FSUB, llvm::APInt::getAllOnesValue(), llvm::ConstantSDNode::getAPIntValue(), llvm::APInt::getBitWidth(), getConstant(), getConstantFP(), getNode(), llvm::SDValue::getNode(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), getUNDEF(), llvm::ConstantFPSDNode::getValueAPF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::MVT::i1, llvm::ISD::INSERT_VECTOR_ELT, isCommutativeBinOp(), llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm::APFloat::mod(), llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::APFloat::multiply(), llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::APFloat::opDivByZero, llvm::APFloat::opInvalidOp, llvm::ISD::OR, llvm::MVT::Other, llvm::MVT::ppcf128, llvm::APFloat::rmNearestTiesToEven, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIV, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SUB, llvm::APFloat::subtract(), std::swap(), llvm::ISD::TokenFactor, llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::ISD::UDIV, llvm::ISD::UNDEF, llvm::UnsafeFPMath, llvm::ISD::UREM, V1, Val, VTs, and llvm::ISD::XOR.

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
SDValue  N1,
SDValue  N2,
SDValue  N3 
)

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
SDValue  N1,
SDValue  N2,
SDValue  N3,
SDValue  N4 
)

Definition at line 2964 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
SDValue  N1,
SDValue  N2,
SDValue  N3,
SDValue  N4,
SDValue  N5 
)

Definition at line 2971 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
const SDUse *  Ops,
unsigned  NumOps 
)

Definition at line 3806 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
EVT  VT,
const SDValue *  Ops,
unsigned  NumOps 
)

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
const std::vector< EVT > &  ResultTys,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 3879 of file SelectionDAG.cpp.

References getNode(), and getVTList().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
const EVT *  VTs,
unsigned  NumVTs,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 3886 of file SelectionDAG.cpp.

References getNode(), and makeVTList().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
const SDValue *  Ops,
unsigned  NumOps 
)

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs 
)

Definition at line 3966 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
SDValue  N 
)

Definition at line 3970 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
SDValue  N1,
SDValue  N2 
)

Definition at line 3976 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
SDValue  N1,
SDValue  N2,
SDValue  N3 
)

Definition at line 3982 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
SDValue  N1,
SDValue  N2,
SDValue  N3,
SDValue  N4 
)

Definition at line 3988 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getNode ( unsigned  Opcode,
DebugLoc  DL,
SDVTList  VTs,
SDValue  N1,
SDValue  N2,
SDValue  N3,
SDValue  N4,
SDValue  N5 
)

Definition at line 3995 of file SelectionDAG.cpp.

References getNode().

SDValue SelectionDAG::getStackArgumentTokenFactor ( SDValue  Chain  ) 

getStackArgumentTokenFactor - Compute a TokenFactor to force all the incoming stack arguments to be loaded from the stack. This is used in tail call lowering to protect stack arguments from being clobbered.

getStackArgumentTokenFactor - Compute a TokenFactor to force all the incoming stack arguments to be loaded from the stack.

Definition at line 2980 of file SelectionDAG.cpp.

References FI, llvm::SDValue::getDebugLoc(), getEntryNode(), getNode(), L, llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), and llvm::ISD::TokenFactor.

SDValue SelectionDAG::getMemcpy ( SDValue  Chain,
DebugLoc  dl,
SDValue  Dst,
SDValue  Src,
SDValue  Size,
unsigned  Align,
bool  AlwaysInline,
const Value *  DstSV,
uint64_t  DstSVOff,
const Value *  SrcSV,
uint64_t  SrcSVOff 
)

SDValue SelectionDAG::getMemmove ( SDValue  Chain,
DebugLoc  dl,
SDValue  Dst,
SDValue  Src,
SDValue  Size,
unsigned  Align,
const Value *  DstSV,
uint64_t  DstOSVff,
const Value *  SrcSV,
uint64_t  SrcSVOff 
)

SDValue SelectionDAG::getMemset ( SDValue  Chain,
DebugLoc  dl,
SDValue  Dst,
SDValue  Src,
SDValue  Size,
unsigned  Align,
const Value *  DstSV,
uint64_t  DstSVOff 
)

SDValue llvm::SelectionDAG::getSetCC ( DebugLoc  DL,
EVT  VT,
SDValue  LHS,
SDValue  RHS,
ISD::CondCode  Cond 
) [inline]

SDValue llvm::SelectionDAG::getVSetCC ( DebugLoc  DL,
EVT  VT,
SDValue  LHS,
SDValue  RHS,
ISD::CondCode  Cond 
) [inline]

getVSetCC - Helper function to make it easier to build VSetCC's nodes if you just have an ISD::CondCode instead of an SDValue.

Definition at line 493 of file SelectionDAG.h.

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

SDValue llvm::SelectionDAG::getSelectCC ( DebugLoc  DL,
SDValue  LHS,
SDValue  RHS,
SDValue  True,
SDValue  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 SDValue.

Definition at line 501 of file SelectionDAG.h.

References getCondCode(), getNode(), llvm::SDValue::getValueType(), and llvm::ISD::SELECT_CC.

Referenced by combineSelectAndUse().

SDValue SelectionDAG::getVAArg ( EVT  VT,
DebugLoc  dl,
SDValue  Chain,
SDValue  Ptr,
SDValue  SV 
)

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

Definition at line 3799 of file SelectionDAG.cpp.

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

SDValue SelectionDAG::getAtomic ( unsigned  Opcode,
DebugLoc  dl,
EVT  MemVT,
SDValue  Chain,
SDValue  Ptr,
SDValue  Cmp,
SDValue  Swp,
const Value *  PtrVal,
unsigned  Alignment = 0 
)

getAtomic - Gets a node for an atomic op, produces result and chain and takes 3 operands

Definition at line 3509 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::ISD::ATOMIC_CMP_SWAP, E, llvm::EVT::getRawBits(), llvm::SDValue::getValueType(), getVTList(), llvm::MVT::Other, and VTs.

SDValue SelectionDAG::getAtomic ( unsigned  Opcode,
DebugLoc  dl,
EVT  MemVT,
SDValue  Chain,
SDValue  Ptr,
SDValue  Val,
const Value *  PtrVal,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getMemIntrinsicNode ( unsigned  Opcode,
DebugLoc  dl,
const EVT *  VTs,
unsigned  NumVTs,
const SDValue *  Ops,
unsigned  NumOps,
EVT  MemVT,
const Value *  srcValue,
int  SVOff,
unsigned  Align = 0,
bool  Vol = false,
bool  ReadMem = true,
bool  WriteMem = true 
)

getMemIntrinsicNode - Creates a MemIntrinsicNode that may produce a result and takes a list of operands.

Definition at line 3593 of file SelectionDAG.cpp.

References makeVTList().

SDValue SelectionDAG::getMemIntrinsicNode ( unsigned  Opcode,
DebugLoc  dl,
SDVTList  VTList,
const SDValue *  Ops,
unsigned  NumOps,
EVT  MemVT,
const Value *  srcValue,
int  SVOff,
unsigned  Align = 0,
bool  Vol = false,
bool  ReadMem = true,
bool  WriteMem = true 
)

SDValue SelectionDAG::getMergeValues ( const SDValue *  Ops,
unsigned  NumOps,
DebugLoc  dl 
)

getMergeValues - Create a MERGE_VALUES node from the given operands.

getMergeValues - Create a MERGE_VALUES node from the given operands. Allowed to return something different (and simpler) if Simplify is true.

Definition at line 3579 of file SelectionDAG.cpp.

References getNode(), llvm::SDValue::getValueType(), getVTList(), llvm::ISD::MERGE_VALUES, llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and VTs.

Referenced by ExpandUnalignedLoad(), llvm::SelectionDAGLowering::getValue(), LowerDYNAMIC_STACKALLOC(), llvm::AlphaTargetLowering::LowerOperation(), and LowerVAARG().

SDValue SelectionDAG::getLoad ( EVT  VT,
DebugLoc  dl,
SDValue  Chain,
SDValue  Ptr,
const Value *  SV,
int  SVOffset,
bool  isVolatile = false,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getExtLoad ( ISD::LoadExtType  ExtType,
DebugLoc  dl,
EVT  VT,
SDValue  Chain,
SDValue  Ptr,
const Value *  SV,
int  SVOffset,
EVT  EVT,
bool  isVolatile = false,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getIndexedLoad ( SDValue  OrigLoad,
DebugLoc  dl,
SDValue  Base,
SDValue  Offset,
ISD::MemIndexedMode  AM 
)

SDValue SelectionDAG::getLoad ( ISD::MemIndexedMode  AM,
DebugLoc  dl,
ISD::LoadExtType  ExtType,
EVT  VT,
SDValue  Chain,
SDValue  Ptr,
SDValue  Offset,
const Value *  SV,
int  SVOffset,
EVT  EVT,
bool  isVolatile = false,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getStore ( SDValue  Chain,
DebugLoc  dl,
SDValue  Val,
SDValue  Ptr,
const Value *  SV,
int  SVOffset,
bool  isVolatile = false,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getTruncStore ( SDValue  Chain,
DebugLoc  dl,
SDValue  Val,
SDValue  Ptr,
const Value *  SV,
int  SVOffset,
EVT  TVT,
bool  isVolatile = false,
unsigned  Alignment = 0 
)

SDValue SelectionDAG::getIndexedStore ( SDValue  OrigStoe,
DebugLoc  dl,
SDValue  Base,
SDValue  Offset,
ISD::MemIndexedMode  AM 
)

SDValue SelectionDAG::getSrcValue ( const Value *  v  ) 

getSrcValue - Construct a node to track a Value* through the backend.

Definition at line 1315 of file SelectionDAG.cpp.

References AddNodeIDNode(), E, llvm::Value::getType(), getVTList(), llvm::MVT::Other, and llvm::ISD::SRCVALUE.

SDValue SelectionDAG::getMemOperand ( const MachineMemOperand &  MO  ) 

getMemOperand - Construct a node to track a memory reference through the backend.

Definition at line 1334 of file SelectionDAG.cpp.

References AddNodeIDNode(), E, llvm::Value::getType(), llvm::MachineMemOperand::getValue(), getVTList(), llvm::ISD::MEMOPERAND, llvm::MVT::Other, and llvm::MachineMemOperand::Profile().

Referenced by llvm::PPCTargetLowering::PerformDAGCombine().

SDValue SelectionDAG::getShiftAmountOperand ( SDValue  Op  ) 

getShiftAmountOperand - Return the specified value casted to the target's desired shift amount type.

getShiftAmountOperand - Return the specified value casted to the target's desired shift amount type.

Definition at line 1358 of file SelectionDAG.cpp.

References llvm::EVT::bitsGT(), llvm::SDValue::getDebugLoc(), getNode(), llvm::TargetLowering::getShiftAmountTy(), llvm::SDValue::getValueType(), llvm::EVT::isVector(), llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.

SDValue SelectionDAG::UpdateNodeOperands ( SDValue  InN,
SDValue  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.

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 4091 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDValue::getResNo(), llvm::SDNode::OperandList, and llvm::SDUse::set().

Referenced by MoveBelowCallSeqStart(), MoveBelowTokenFactor(), PerformMEMBARRIERCombine(), UpdateNodeOperand(), and UpdateNodeOperands().

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

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

Definition at line 4147 of file SelectionDAG.cpp.

References UpdateNodeOperands().

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

Definition at line 4153 of file SelectionDAG.cpp.

References UpdateNodeOperands().

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

Definition at line 4160 of file SelectionDAG.cpp.

References UpdateNodeOperands().

SDValue SelectionDAG::UpdateNodeOperands ( SDValue  N,
const SDValue *  Ops,
unsigned  NumOps 
)

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  MachineOpc,
EVT  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 ~TargetOpcode in the node opcode field. The resultant node is returned.

SelectNodeTo - These are wrappers around MorphNodeTo that accept a machine opcode.

Definition at line 4218 of file SelectionDAG.cpp.

References getVTList(), and VTs.

Referenced by SelectNodeTo().

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT,
SDValue  Op1 
)

Definition at line 4224 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4231 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4239 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4247 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2 
)

Definition at line 4261 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4254 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
EVT  VT3,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4267 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  MachineOpc,
EVT  VT1,
EVT  VT2,
EVT  VT3,
EVT  VT4,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4274 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
SDValue  Op1 
)

Definition at line 4281 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4289 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4297 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
EVT  VT1,
EVT  VT2,
EVT  VT3,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4306 of file SelectionDAG.cpp.

References getVTList(), SelectNodeTo(), and VTs.

SDNode * SelectionDAG::SelectNodeTo ( SDNode *  N,
unsigned  TargetOpc,
SDVTList  VTs,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4315 of file SelectionDAG.cpp.

References MorphNodeTo().

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT 
)

MorphNodeTo - These *mutate* the specified node to have the specified return type, opcode, and operands.

Definition at line 4321 of file SelectionDAG.cpp.

References getVTList(), and VTs.

Referenced by MorphNodeTo(), and SelectNodeTo().

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT,
SDValue  Op1 
)

Definition at line 4327 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4334 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4342 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4350 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2 
)

Definition at line 4364 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4357 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2,
EVT  VT3,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4370 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2,
SDValue  Op1 
)

Definition at line 4377 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4385 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4393 of file SelectionDAG.cpp.

References getVTList(), MorphNodeTo(), and VTs.

SDNode * SelectionDAG::MorphNodeTo ( SDNode *  N,
unsigned  Opc,
SDVTList  VTs,
const SDValue *  Ops,
unsigned  NumOps 
)

MorphNodeTo - These *mutate* the specified node to have the specified return type, opcode, and operands.

Note that MorphNodeTo 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. Note that the DebugLoc need not be the same.

Using MorphNodeTo is faster than creating a new node and swapping it in with ReplaceAllUsesWith both because it often avoids allocating a new node, and because it doesn't require CSE recalculation for any of the node's users.

Definition at line 4414 of file SelectionDAG.cpp.

References AddNodeIDNode(), llvm::BumpPtrAllocator::Allocate(), llvm::SmallPtrSet< PtrType, SmallSize >::begin(), E, llvm::SmallPtrSet< PtrType, SmallSize >::end(), llvm::MVT::Flag, llvm::SDUse::getNode(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::SDNode::isMachineOpcode(), llvm::SDNode::NodeType, llvm::SDNode::NumOperands, llvm::SDNode::NumValues, llvm::SDVTList::NumVTs, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::SDNode::OperandList, llvm::SDNode::OperandsNeedDelete, llvm::SmallVectorImpl< T >::push_back(), RemoveDeadNodes(), llvm::SDUse::set(), llvm::SDUse::setInitial(), llvm::SDUse::setUser(), llvm::SDNode::use_empty(), llvm::SDNode::ValueList, and llvm::SDVTList::VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  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.

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 4491 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

Referenced by getTargetExtractSubreg(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), and llvm::X86InstrInfo::unfoldMemoryOperand().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT,
SDValue  Op1 
)

Definition at line 4495 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4500 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4505 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4511 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2 
)

Definition at line 4516 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
SDValue  Op1 
)

Definition at line 4523 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4529 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4537 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4545 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
EVT  VT3,
SDValue  Op1,
SDValue  Op2 
)

Definition at line 4552 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
EVT  VT3,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3 
)

Definition at line 4560 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
EVT  VT3,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4569 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
EVT  VT1,
EVT  VT2,
EVT  VT3,
EVT  VT4,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4576 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.

SDNode * SelectionDAG::getTargetNode ( unsigned  Opcode,
DebugLoc  dl,
const std::vector< EVT > &  ResultTys,
const SDValue *  Ops,
unsigned  NumOps 
)

Definition at line 4583 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getNode().

SDValue SelectionDAG::getTargetExtractSubreg ( int  SRIdx,
DebugLoc  DL,
EVT  VT,
SDValue  Operand 
)

getTargetExtractSubreg - A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.

getTargetExtractSubreg - A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.

Definition at line 4592 of file SelectionDAG.cpp.

References llvm::TargetInstrInfo::EXTRACT_SUBREG, getTargetConstant(), getTargetNode(), and llvm::MVT::i32.

SDNode * SelectionDAG::getNodeIfExists ( unsigned  Opcode,
SDVTList  VTList,
const SDValue *  Ops,
unsigned  NumOps 
)

getNodeIfExists - Get the specified node if it's already available, or else return NULL.

getNodeIfExists - Get the specified node if it's already available, or else return NULL.

Definition at line 4602 of file SelectionDAG.cpp.

References AddNodeIDNode(), E, llvm::MVT::Flag, llvm::SDVTList::NumVTs, and llvm::SDVTList::VTs.

void SelectionDAG::RemoveDeadNode ( SDNode *  N,
DAGUpdateListener *  UpdateListener = 0 
)

RemoveDeadNode - Remove the specified node from the system. If any of its operands then becomes dead, remove them as well. Inform UpdateListener for each node deleted.

Definition at line 579 of file SelectionDAG.cpp.

References RemoveDeadNodes().

void SelectionDAG::RemoveDeadNodes ( SmallVectorImpl< SDNode * > &  DeadNodes,
DAGUpdateListener *  UpdateListener = 0 
)

RemoveDeadNodes - This method deletes the unreachable nodes in the given list, and any nodes that become unreachable as a result.

RemoveDeadNodes - This method deletes the unreachable nodes in the given list, and any nodes that become unreachable as a result.

Definition at line 549 of file SelectionDAG.cpp.

References E, llvm::SmallVectorImpl< T >::empty(), llvm::SDUse::getNode(), llvm::SelectionDAG::DAGUpdateListener::NodeDeleted(), llvm::SDNode::op_begin(), llvm::SDNode::op_end(), Operand, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorImpl< T >::push_back(), llvm::SDUse::set(), and llvm::SDNode::use_empty().

void SelectionDAG::ReplaceAllUsesWith ( SDValue  FromN,
SDValue  To,
DAGUpdateListener *  UpdateListener = 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 (or if 'To' has a superset of the results of 'From'), use the third otherwise.

These methods all take an optional UpdateListener, which (if not null) is informed about nodes that are deleted and modified due to recursive changes in the dag.

These functions only replace all existing uses. It's possible that as these replacements are being performed, CSE may cause the From node to be given new uses. These new uses of From are left in place, and not automatically transfered to To.

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

This version assumes From has a single result value.

Definition at line 4619 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), llvm::SDValue::getResNo(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().

Referenced by ReplaceAllUsesOfValueWith(), ReplaceAllUsesWith(), and UpdateNodeOperand().

void SelectionDAG::ReplaceAllUsesWith ( SDNode *  From,
SDNode *  To,
DAGUpdateListener *  UpdateListener = 0 
)

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

This version assumes that for each value of From, there is a corresponding value in To in the same position with the same type.

Definition at line 4662 of file SelectionDAG.cpp.

References llvm::SDNode::getNumValues(), llvm::SDNode::use_iterator::getUse(), llvm::SDNode::getValueType(), llvm::SDNode::hasAnyUseOfValue(), llvm::SDUse::setNode(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().

void SelectionDAG::ReplaceAllUsesWith ( SDNode *  From,
const SDValue *  To,
DAGUpdateListener *  UpdateListener = 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 4705 of file SelectionDAG.cpp.

References llvm::SDNode::getNumValues(), llvm::SDUse::getResNo(), llvm::SDNode::use_iterator::getUse(), ReplaceAllUsesWith(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().

void SelectionDAG::ReplaceAllUsesOfValueWith ( SDValue  From,
SDValue  To,
DAGUpdateListener *  UpdateListener = 0 
)

ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving uses of other values produced by From.Val alone.

ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone. The Deleted vector is handled the same way as for ReplaceAllUsesWith.

Definition at line 4740 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), llvm::SDUse::getResNo(), llvm::SDValue::getResNo(), llvm::SDNode::use_iterator::getUse(), ReplaceAllUsesWith(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().

Referenced by llvm::PIC16TargetLowering::PerformPIC16LoadCombine(), and ReplaceAllUsesOfValuesWith().

void SelectionDAG::ReplaceAllUsesOfValuesWith ( const SDValue *  From,
const SDValue *  To,
unsigned  Num,
DAGUpdateListener *  UpdateListener = 0 
)

ReplaceAllUsesOfValuesWith - Like ReplaceAllUsesOfValueWith, but for multiple values at once. This correctly handles the case where there is an overlap between the From values and the To values.

ReplaceAllUsesOfValuesWith - Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone. The same value may appear in both the From and To list. The Deleted vector is handled the same way as for ReplaceAllUsesWith.

Definition at line 4813 of file SelectionDAG.cpp.

References llvm::SmallVectorImpl< T >::begin(), E, llvm::SmallVectorImpl< T >::end(), llvm::SDValue::getNode(), llvm::SDUse::getResNo(), llvm::SDValue::getResNo(), llvm::SmallVectorImpl< T >::push_back(), ReplaceAllUsesOfValueWith(), llvm::SDUse::set(), llvm::SmallVectorImpl< T >::size(), llvm::SDNode::use_begin(), llvm::SDNode::use_end(), and Uses.

unsigned SelectionDAG::AssignTopologicalOrder (  ) 

AssignTopologicalOrder - Topological-sort the AllNodes list and a assign a unique node id for each node in the DAG based on their topological order. Returns the number of nodes.

AssignTopologicalOrder - Assign a unique node id for each node in the DAG based on their topological order. It returns the maximum id and a vector of the SDNodes* in assigned order by reference.

Definition at line 4871 of file SelectionDAG.cpp.

References allnodes_begin(), allnodes_end(), allnodes_size(), E, llvm::ISD::EntryToken, llvm::SDNode::getNodeId(), llvm::SDNode::getNumOperands(), Q, llvm::SDNode::setNodeId(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().

Referenced by llvm::SelectionDAGISel::SelectRootInit().

void llvm::SelectionDAG::RepositionNode ( allnodes_iterator  Position,
SDNode *  N 
) [inline]

RepositionNode - Move node N in the AllNodes list to be immediately before the given iterator Position. This may be used to update the topological ordering when the list of nodes is modified.

Definition at line 766 of file SelectionDAG.h.

static bool llvm::SelectionDAG::isCommutativeBinOp ( unsigned  Opcode  )  [inline, static]

void SelectionDAG::dump (  )  const

Definition at line 5653 of file SelectionDAG.cpp.

Referenced by LowerSTORE().

SDValue SelectionDAG::CreateStackTemporary ( EVT  VT,
unsigned  minAlign = 1 
)

CreateStackTemporary - Create a stack temporary, suitable for holding the specified value type. If minAlign is specified, the slot size will have at least that alignment.

CreateStackTemporary - Create a stack temporary, suitable for holding the specified value type.

Definition at line 1369 of file SelectionDAG.cpp.

References llvm::MachineFrameInfo::CreateStackObject(), FrameIdx, getContext(), getFrameIndex(), llvm::MachineFunction::getFrameInfo(), getMachineFunction(), llvm::TargetLowering::getPointerTy(), llvm::TargetData::getPrefTypeAlignment(), llvm::EVT::getStoreSizeInBits(), llvm::TargetLowering::getTargetData(), and llvm::EVT::getTypeForEVT().

Referenced by ExpandUnalignedLoad(), ExpandUnalignedStore(), and llvm::SparcTargetLowering::LowerCall().

SDValue SelectionDAG::CreateStackTemporary ( EVT  VT1,
EVT  VT2 
)

CreateStackTemporary - Create a stack temporary suitable for holding either of the specified value types.

CreateStackTemporary - Create a stack temporary suitable for holding either of the specified value types.

Definition at line 1382 of file SelectionDAG.cpp.

References Align, FrameIdx, getContext(), getFrameIndex(), llvm::MachineFunction::getFrameInfo(), getMachineFunction(), llvm::TargetLowering::getPointerTy(), llvm::TargetData::getPrefTypeAlignment(), llvm::EVT::getStoreSizeInBits(), llvm::TargetLowering::getTargetData(), llvm::EVT::getTypeForEVT(), and TD.

SDValue SelectionDAG::FoldConstantArithmetic ( unsigned  Opcode,
EVT  VT,
ConstantSDNode *  Cst1,
ConstantSDNode *  Cst2 
)

SDValue SelectionDAG::FoldSetCC ( EVT  VT,
SDValue  N1,
SDValue  N2,
ISD::CondCode  Cond,
DebugLoc  dl 
)

bool SelectionDAG::SignBitIsZero ( SDValue  Op,
unsigned  Depth = 0 
) const

SignBitIsZero - Return true if the sign bit of Op is known to be zero. We use this predicate to simplify operations downstream.

SignBitIsZero - Return true if the sign bit of Op is known to be zero. We use this predicate to simplify operations downstream.

Definition at line 1500 of file SelectionDAG.cpp.

References llvm::APInt::getSignBit(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), llvm::EVT::isVector(), and MaskedValueIsZero().

bool SelectionDAG::MaskedValueIsZero ( SDValue  Op,
const APInt &  Mask,
unsigned  Depth = 0 
) const

MaskedValueIsZero - Return true if 'Op & Mask' is known to be zero. We use this predicate to simplify operations downstream. Op and Mask are known to be the same type.

MaskedValueIsZero - Return true if 'V & Mask' is known to be zero. We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.

Definition at line 1512 of file SelectionDAG.cpp.

References ComputeMaskedBits().

Referenced by llvm::SelectionDAGISel::CheckAndMask(), SignBitIsZero(), and llvm::TargetLowering::SimplifySetCC().

void SelectionDAG::ComputeMaskedBits ( SDValue  Op,
const APInt &  Mask,
APInt &  KnownZero,
APInt &  KnownOne,
unsigned  Depth = 0 
) const

ComputeMaskedBits - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets. This code only analyzes bits in Mask, in order to short-circuit processing. Targets can implement the computeMaskedBitsForTargetNode method in the TargetLowering class to allow target nodes to be understood.

ComputeMaskedBits - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets. This code only analyzes bits in Mask, in order to short-circuit processing.

Definition at line 1524 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::AssertZext, llvm::ISD::BUILTIN_OP_END, llvm::TargetLowering::computeMaskedBitsForTargetNode(), llvm::ISD::Constant, llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::FGETSIGN, llvm::APInt::getAllOnesValue(), llvm::APInt::getBitWidth(), llvm::TargetLowering::getBooleanContents(), llvm::APInt::getBoolValue(), llvm::APInt::getHighBitsSet(), llvm::APInt::getLowBitsSet(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getResNo(), llvm::APInt::getSignBit(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::APInt::isPowerOf2(), llvm::APInt::isStrictlyPositive(), llvm::ISD::isZEXTLoad(), llvm::ISD::LOAD, llvm::Log2_32(), llvm::APInt::lshr(), llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SADDO, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SSUBO, llvm::ISD::SUB, llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UDIV, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::ISD::USUBO, llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, llvm::TargetLowering::ZeroOrOneBooleanContent, and llvm::APInt::zext().

Referenced by llvm::SelectionDAGISel::CheckOrMask(), llvm::SparcTargetLowering::computeMaskedBitsForTargetNode(), llvm::ARMTargetLowering::computeMaskedBitsForTargetNode(), ComputeNumSignBits(), MaskedValueIsZero(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), llvm::PPCTargetLowering::SelectAddressRegReg(), llvm::TargetLowering::SimplifyDemandedBits(), and ValueHasExactlyOneBitSet().

unsigned SelectionDAG::ComputeNumSignBits ( SDValue  Op,
unsigned  Depth = 0 
) const

ComputeNumSignBits - Return the number of times the sign bit of the register is replicated into the other bits. We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "SRA X, 2", we know that the top 3 bits are all equal to each other, so we return 3. Targets can implement the ComputeNumSignBitsForTarget method in the TargetLowering class to allow target nodes to be understood.

ComputeNumSignBits - Return the number of times the sign bit of the register is replicated into the other bits. We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "SRA X, 2", we know that the top 3 bits are all equal to each other, so we return 3.

Definition at line 1982 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::ISD::BUILTIN_OP_END, llvm::CallingConv::C, ComputeMaskedBits(), llvm::TargetLowering::ComputeNumSignBitsForTargetNode(), llvm::ISD::Constant, llvm::APInt::countLeadingOnes(), llvm::APInt::countLeadingZeros(), llvm::APInt::getAllOnesValue(), llvm::APInt::getBitWidth(), llvm::TargetLowering::getBooleanContents(), llvm::LoadSDNode::getExtensionType(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getResNo(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isInteger(), llvm::APInt::isNegative(), llvm::ISD::LOAD, llvm::ISD::OR, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SADDO, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::ISD::SEXTLOAD, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SSUBO, llvm::ISD::SUB, llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UMULO, llvm::ISD::USUBO, Val, llvm::ISD::XOR, llvm::TargetLowering::ZeroOrNegativeOneBooleanContent, and llvm::ISD::ZEXTLOAD.

bool SelectionDAG::isVerifiedDebugInfoDesc ( SDValue  Op  )  const

isVerifiedDebugInfoDesc - Returns true if the specified SDValue has been verified as a debug information descriptor.

Definition at line 2203 of file SelectionDAG.cpp.

References llvm::dyn_cast(), llvm::GlobalAddressSDNode::getGlobal(), getMachineModuleInfo(), llvm::GlobalAddressSDNode::getOffset(), GV, and llvm::MachineModuleInfo::hasDebugInfo().

SDValue SelectionDAG::getShuffleScalarElt ( const ShuffleVectorSDNode *  N,
unsigned  i 
)

getShuffleScalarElt - Returns the scalar element that will make up the ith element of the result of the vector shuffle.

getShuffleScalarElt - Returns the scalar element that will make up the ith element of the result of the vector shuffle.

Definition at line 2216 of file SelectionDAG.cpp.

References llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, llvm::SDNode::getDebugLoc(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), getUNDEF(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), Index, llvm::EVT::isVector(), llvm::ISD::SCALAR_TO_VECTOR, and V.

Referenced by EltsFromConsecutiveLoads(), and getNumOfConsecutiveZeros().


Member Data Documentation

std::map<const SDNode *, std::string> llvm::SelectionDAG::NodeGraphAttrs

Definition at line 150 of file SelectionDAG.h.

Referenced by clearGraphAttrs(), getGraphAttrs(), setGraphAttrs(), and setGraphColor().


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