1 //===-- llvm/CodeGen/SelectionDAGNodes.h - SelectionDAG Nodes ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the SDNode class and derived classes, which are used to
11 // represent the nodes and operations present in a SelectionDAG. These nodes
12 // and operations are machine code level operations, with some similarities to
13 // the GCC RTL representation.
15 // Clients should include the SelectionDAG.h file instead of this file directly.
17 //===----------------------------------------------------------------------===//
19 #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
20 #define LLVM_CODEGEN_SELECTIONDAGNODES_H
22 #include "llvm/CodeGen/ValueTypes.h"
23 #include "llvm/Value.h"
24 #include "llvm/ADT/GraphTraits.h"
25 #include "llvm/ADT/iterator"
26 #include "llvm/Support/DataTypes.h"
34 class MachineBasicBlock;
36 template <typename T> struct simplify_type;
37 template <typename T> struct ilist_traits;
38 template<typename NodeTy, typename Traits> class iplist;
39 template<typename NodeTy> class ilist_iterator;
41 /// ISD namespace - This namespace contains an enum which represents all of the
42 /// SelectionDAG node types and value types.
45 //===--------------------------------------------------------------------===//
46 /// ISD::NodeType enum - This enum defines all of the operators valid in a
50 // EntryToken - This is the marker used to indicate the start of the region.
53 // Token factor - This node takes multiple tokens as input and produces a
54 // single token result. This is used to represent the fact that the operand
55 // operators are independent of each other.
58 // AssertSext, AssertZext - These nodes record if a register contains a
59 // value that has already been zero or sign extended from a narrower type.
60 // These nodes take two operands. The first is the node that has already
61 // been extended, and the second is a value type node indicating the width
63 AssertSext, AssertZext,
65 // Various leaf nodes.
66 STRING, BasicBlock, VALUETYPE, CONDCODE, Register,
68 GlobalAddress, FrameIndex, ConstantPool, ExternalSymbol,
70 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
71 // simplification of the constant.
75 // TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or
76 // anything else with this node, and this is valid in the target-specific
77 // dag, turning into a GlobalAddress operand.
83 /// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...)
84 /// This node represents a target intrinsic function with no side effects.
85 /// The first operand is the ID number of the intrinsic from the
86 /// llvm::Intrinsic namespace. The operands to the intrinsic follow. The
87 /// node has returns the result of the intrinsic.
90 /// RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...)
91 /// This node represents a target intrinsic function with side effects that
92 /// returns a result. The first operand is a chain pointer. The second is
93 /// the ID number of the intrinsic from the llvm::Intrinsic namespace. The
94 /// operands to the intrinsic follow. The node has two results, the result
95 /// of the intrinsic and an output chain.
98 /// OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...)
99 /// This node represents a target intrinsic function with side effects that
100 /// does not return a result. The first operand is a chain pointer. The
101 /// second is the ID number of the intrinsic from the llvm::Intrinsic
102 /// namespace. The operands to the intrinsic follow.
105 // CopyToReg - This node has three operands: a chain, a register number to
106 // set to this value, and a value.
109 // CopyFromReg - This node indicates that the input value is a virtual or
110 // physical register that is defined outside of the scope of this
111 // SelectionDAG. The register is available from the RegSDNode object.
114 // UNDEF - An undefined node
117 // EXTRACT_ELEMENT - This is used to get the first or second (determined by
118 // a Constant, which is required to be operand #1), element of the aggregate
119 // value specified as operand #0. This is only for use before legalization,
120 // for values that will be broken into multiple registers.
123 // BUILD_PAIR - This is the opposite of EXTRACT_ELEMENT in some ways. Given
124 // two values of the same integer value type, this produces a value twice as
125 // big. Like EXTRACT_ELEMENT, this can only be used before legalization.
128 // MERGE_VALUES - This node takes multiple discrete operands and returns
129 // them all as its individual results. This nodes has exactly the same
130 // number of inputs and outputs, and is only valid before legalization.
131 // This node is useful for some pieces of the code generator that want to
132 // think about a single node with multiple results, not multiple nodes.
135 // Simple integer binary arithmetic operators.
136 ADD, SUB, MUL, SDIV, UDIV, SREM, UREM,
138 // Carry-setting nodes for multiple precision addition and subtraction.
139 // These nodes take two operands of the same value type, and produce two
140 // results. The first result is the normal add or sub result, the second
141 // result is the carry flag result.
144 // Carry-using nodes for multiple precision addition and subtraction. These
145 // nodes take three operands: The first two are the normal lhs and rhs to
146 // the add or sub, and the third is the input carry flag. These nodes
147 // produce two results; the normal result of the add or sub, and the output
148 // carry flag. These nodes both read and write a carry flag to allow them
149 // to them to be chained together for add and sub of arbitrarily large
153 // Simple binary floating point operators.
154 FADD, FSUB, FMUL, FDIV, FREM,
156 // FCOPYSIGN(X, Y) - Return the value of X with the sign of Y. NOTE: This
157 // DAG node does not require that X and Y have the same type, just that they
158 // are both floating point. X and the result must have the same type.
159 // FCOPYSIGN(f32, f64) is allowed.
162 /// VBUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,..., COUNT,TYPE) - Return a vector
163 /// with the specified, possibly variable, elements. The number of elements
164 /// is required to be a power of two.
167 /// BUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,...) - Return a vector
168 /// with the specified, possibly variable, elements. The number of elements
169 /// is required to be a power of two.
172 /// VINSERT_VECTOR_ELT(VECTOR, VAL, IDX, COUNT,TYPE) - Given a vector
173 /// VECTOR, an element ELEMENT, and a (potentially variable) index IDX,
174 /// return an vector with the specified element of VECTOR replaced with VAL.
175 /// COUNT and TYPE specify the type of vector, as is standard for V* nodes.
178 /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR (a legal packed
179 /// type) with the element at IDX replaced with VAL.
182 /// VEXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
183 /// (an MVT::Vector value) identified by the (potentially variable) element
187 /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR
188 /// (a legal packed type vector) identified by the (potentially variable)
189 /// element number IDX.
192 /// VVECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC, COUNT,TYPE) - Returns a vector,
193 /// of the same type as VEC1/VEC2. SHUFFLEVEC is a VBUILD_VECTOR of
194 /// constant int values that indicate which value each result element will
195 /// get. The elements of VEC1/VEC2 are enumerated in order. This is quite
196 /// similar to the Altivec 'vperm' instruction, except that the indices must
197 /// be constants and are in terms of the element size of VEC1/VEC2, not in
201 /// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same
202 /// type as VEC1/VEC2. SHUFFLEVEC is a BUILD_VECTOR of constant int values
203 /// (regardless of whether its datatype is legal or not) that indicate
204 /// which value each result element will get. The elements of VEC1/VEC2 are
205 /// enumerated in order. This is quite similar to the Altivec 'vperm'
206 /// instruction, except that the indices must be constants and are in terms
207 /// of the element size of VEC1/VEC2, not in terms of bytes.
210 /// X = VBIT_CONVERT(Y) and X = VBIT_CONVERT(Y, COUNT,TYPE) - This node
211 /// represents a conversion from or to an ISD::Vector type.
213 /// This is lowered to a BIT_CONVERT of the appropriate input/output types.
214 /// The input and output are required to have the same size and at least one
215 /// is required to be a vector (if neither is a vector, just use
218 /// If the result is a vector, this takes three operands (like any other
219 /// vector producer) which indicate the size and type of the vector result.
220 /// Otherwise it takes one input.
223 /// BINOP(LHS, RHS, COUNT,TYPE)
224 /// Simple abstract vector operators. Unlike the integer and floating point
225 /// binary operators, these nodes also take two additional operands:
226 /// a constant element count, and a value type node indicating the type of
227 /// the elements. The order is count, type, op0, op1. All vector opcodes,
228 /// including VLOAD and VConstant must currently have count and type as
229 /// their last two operands.
230 VADD, VSUB, VMUL, VSDIV, VUDIV,
233 /// VSELECT(COND,LHS,RHS, COUNT,TYPE) - Select for MVT::Vector values.
234 /// COND is a boolean value. This node return LHS if COND is true, RHS if
238 /// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a
239 /// scalar value into the low element of the resultant vector type. The top
240 /// elements of the vector are undefined.
243 // MULHU/MULHS - Multiply high - Multiply two integers of type iN, producing
244 // an unsigned/signed value of type i[2*n], then return the top part.
247 // Bitwise operators - logical and, logical or, logical xor, shift left,
248 // shift right algebraic (shift in sign bits), shift right logical (shift in
249 // zeroes), rotate left, rotate right, and byteswap.
250 AND, OR, XOR, SHL, SRA, SRL, ROTL, ROTR, BSWAP,
252 // Counting operators
255 // Select(COND, TRUEVAL, FALSEVAL)
258 // Select with condition operator - This selects between a true value and
259 // a false value (ops #2 and #3) based on the boolean result of comparing
260 // the lhs and rhs (ops #0 and #1) of a conditional expression with the
261 // condition code in op #4, a CondCodeSDNode.
264 // SetCC operator - This evaluates to a boolean (i1) true value if the
265 // condition is true. The operands to this are the left and right operands
266 // to compare (ops #0, and #1) and the condition code to compare them with
267 // (op #2) as a CondCodeSDNode.
270 // SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded
271 // integer shift operations, just like ADD/SUB_PARTS. The operation
273 // [Lo,Hi] = op [LoLHS,HiLHS], Amt
274 SHL_PARTS, SRA_PARTS, SRL_PARTS,
276 // Conversion operators. These are all single input single output
277 // operations. For all of these, the result type must be strictly
278 // wider or narrower (depending on the operation) than the source
281 // SIGN_EXTEND - Used for integer types, replicating the sign bit
285 // ZERO_EXTEND - Used for integer types, zeroing the new bits.
288 // ANY_EXTEND - Used for integer types. The high bits are undefined.
291 // TRUNCATE - Completely drop the high bits.
294 // [SU]INT_TO_FP - These operators convert integers (whose interpreted sign
295 // depends on the first letter) to floating point.
299 // SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to
300 // sign extend a small value in a large integer register (e.g. sign
301 // extending the low 8 bits of a 32-bit register to fill the top 24 bits
302 // with the 7th bit). The size of the smaller type is indicated by the 1th
303 // operand, a ValueType node.
306 // FP_TO_[US]INT - Convert a floating point value to a signed or unsigned
311 // FP_ROUND - Perform a rounding operation from the current
312 // precision down to the specified precision (currently always 64->32).
315 // FP_ROUND_INREG - This operator takes a floating point register, and
316 // rounds it to a floating point value. It then promotes it and returns it
317 // in a register of the same size. This operation effectively just discards
318 // excess precision. The type to round down to is specified by the 1th
319 // operation, a VTSDNode (currently always 64->32->64).
322 // FP_EXTEND - Extend a smaller FP type into a larger FP type.
325 // BIT_CONVERT - Theis operator converts between integer and FP values, as
326 // if one was stored to memory as integer and the other was loaded from the
327 // same address (or equivalently for vector format conversions, etc). The
328 // source and result are required to have the same bit size (e.g.
329 // f32 <-> i32). This can also be used for int-to-int or fp-to-fp
330 // conversions, but that is a noop, deleted by getNode().
333 // FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation,
334 // absolute value, square root, sine and cosine operations.
335 FNEG, FABS, FSQRT, FSIN, FCOS,
337 // Other operators. LOAD and STORE have token chains as their first
338 // operand, then the same operands as an LLVM load/store instruction, then a
339 // SRCVALUE node that provides alias analysis information.
342 // Abstract vector version of LOAD. VLOAD has a constant element count as
343 // the first operand, followed by a value type node indicating the type of
344 // the elements, a token chain, a pointer operand, and a SRCVALUE node.
347 // EXTLOAD, SEXTLOAD, ZEXTLOAD - These three operators all load a value from
348 // memory and extend them to a larger value (e.g. load a byte into a word
349 // register). All three of these have four operands, a token chain, a
350 // pointer to load from, a SRCVALUE for alias analysis, and a VALUETYPE node
351 // indicating the type to load.
353 // SEXTLOAD loads the integer operand and sign extends it to a larger
354 // integer result type.
355 // ZEXTLOAD loads the integer operand and zero extends it to a larger
356 // integer result type.
357 // EXTLOAD is used for three things: floating point extending loads,
358 // integer extending loads [the top bits are undefined], and vector
359 // extending loads [load into low elt].
360 EXTLOAD, SEXTLOAD, ZEXTLOAD,
362 // TRUNCSTORE - This operators truncates (for integer) or rounds (for FP) a
363 // value and stores it to memory in one operation. This can be used for
364 // either integer or floating point operands. The first four operands of
365 // this are the same as a standard store. The fifth is the ValueType to
366 // store it as (which will be smaller than the source value).
369 // DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned
370 // to a specified boundary. The first operand is the token chain, the
371 // second is the number of bytes to allocate, and the third is the alignment
372 // boundary. The size is guaranteed to be a multiple of the stack
373 // alignment, and the alignment is guaranteed to be bigger than the stack
374 // alignment (if required) or 0 to get standard stack alignment.
377 // Control flow instructions. These all have token chains.
379 // BR - Unconditional branch. The first operand is the chain
380 // operand, the second is the MBB to branch to.
383 // BRCOND - Conditional branch. The first operand is the chain,
384 // the second is the condition, the third is the block to branch
385 // to if the condition is true.
388 // BR_CC - Conditional branch. The behavior is like that of SELECT_CC, in
389 // that the condition is represented as condition code, and two nodes to
390 // compare, rather than as a combined SetCC node. The operands in order are
391 // chain, cc, lhs, rhs, block to branch to if condition is true.
394 // RET - Return from function. The first operand is the chain,
395 // and any subsequent operands are the return values for the
396 // function. This operation can have variable number of operands.
399 // INLINEASM - Represents an inline asm block. This node always has two
400 // return values: a chain and a flag result. The inputs are as follows:
401 // Operand #0 : Input chain.
402 // Operand #1 : a ExternalSymbolSDNode with a pointer to the asm string.
403 // Operand #2n+2: A RegisterNode.
404 // Operand #2n+3: A TargetConstant, indicating if the reg is a use/def
405 // Operand #last: Optional, an incoming flag.
408 // STACKSAVE - STACKSAVE has one operand, an input chain. It produces a
409 // value, the same type as the pointer type for the system, and an output
413 // STACKRESTORE has two operands, an input chain and a pointer to restore to
414 // it returns an output chain.
417 // MEMSET/MEMCPY/MEMMOVE - The first operand is the chain, and the rest
418 // correspond to the operands of the LLVM intrinsic functions. The only
419 // result is a token chain. The alignment argument is guaranteed to be a
425 // CALLSEQ_START/CALLSEQ_END - These operators mark the beginning and end of
426 // a call sequence, and carry arbitrary information that target might want
427 // to know. The first operand is a chain, the rest are specified by the
428 // target and not touched by the DAG optimizers.
429 CALLSEQ_START, // Beginning of a call sequence
430 CALLSEQ_END, // End of a call sequence
432 // VAARG - VAARG has three operands: an input chain, a pointer, and a
433 // SRCVALUE. It returns a pair of values: the vaarg value and a new chain.
436 // VACOPY - VACOPY has five operands: an input chain, a destination pointer,
437 // a source pointer, a SRCVALUE for the destination, and a SRCVALUE for the
441 // VAEND, VASTART - VAEND and VASTART have three operands: an input chain, a
442 // pointer, and a SRCVALUE.
445 // SRCVALUE - This corresponds to a Value*, and is used to associate memory
446 // locations with their value. This allows one use alias analysis
447 // information in the backend.
450 // PCMARKER - This corresponds to the pcmarker intrinsic.
453 // READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic.
454 // The only operand is a chain and a value and a chain are produced. The
455 // value is the contents of the architecture specific cycle counter like
456 // register (or other high accuracy low latency clock source)
459 // HANDLENODE node - Used as a handle for various purposes.
462 // LOCATION - This node is used to represent a source location for debug
463 // info. It takes token chain as input, then a line number, then a column
464 // number, then a filename, then a working dir. It produces a token chain
468 // DEBUG_LOC - This node is used to represent source line information
469 // embedded in the code. It takes a token chain as input, then a line
470 // number, then a column then a file id (provided by MachineDebugInfo.) It
471 // produces a token chain as output.
474 // DEBUG_LABEL - This node is used to mark a location in the code where a
475 // label should be generated for use by the debug information. It takes a
476 // token chain as input and then a unique id (provided by MachineDebugInfo.)
477 // It produces a token chain as output.
480 // BUILTIN_OP_END - This must be the last enum value in this list.
486 /// isBuildVectorAllOnes - Return true if the specified node is a
487 /// BUILD_VECTOR where all of the elements are ~0 or undef.
488 bool isBuildVectorAllOnes(const SDNode *N);
490 /// isBuildVectorAllZeros - Return true if the specified node is a
491 /// BUILD_VECTOR where all of the elements are 0 or undef.
492 bool isBuildVectorAllZeros(const SDNode *N);
494 //===--------------------------------------------------------------------===//
495 /// ISD::CondCode enum - These are ordered carefully to make the bitfields
496 /// below work out, when considering SETFALSE (something that never exists
497 /// dynamically) as 0. "U" -> Unsigned (for integer operands) or Unordered
498 /// (for floating point), "L" -> Less than, "G" -> Greater than, "E" -> Equal
499 /// to. If the "N" column is 1, the result of the comparison is undefined if
500 /// the input is a NAN.
502 /// All of these (except for the 'always folded ops') should be handled for
503 /// floating point. For integer, only the SETEQ,SETNE,SETLT,SETLE,SETGT,
504 /// SETGE,SETULT,SETULE,SETUGT, and SETUGE opcodes are used.
506 /// Note that these are laid out in a specific order to allow bit-twiddling
507 /// to transform conditions.
509 // Opcode N U L G E Intuitive operation
510 SETFALSE, // 0 0 0 0 Always false (always folded)
511 SETOEQ, // 0 0 0 1 True if ordered and equal
512 SETOGT, // 0 0 1 0 True if ordered and greater than
513 SETOGE, // 0 0 1 1 True if ordered and greater than or equal
514 SETOLT, // 0 1 0 0 True if ordered and less than
515 SETOLE, // 0 1 0 1 True if ordered and less than or equal
516 SETONE, // 0 1 1 0 True if ordered and operands are unequal
517 SETO, // 0 1 1 1 True if ordered (no nans)
518 SETUO, // 1 0 0 0 True if unordered: isnan(X) | isnan(Y)
519 SETUEQ, // 1 0 0 1 True if unordered or equal
520 SETUGT, // 1 0 1 0 True if unordered or greater than
521 SETUGE, // 1 0 1 1 True if unordered, greater than, or equal
522 SETULT, // 1 1 0 0 True if unordered or less than
523 SETULE, // 1 1 0 1 True if unordered, less than, or equal
524 SETUNE, // 1 1 1 0 True if unordered or not equal
525 SETTRUE, // 1 1 1 1 Always true (always folded)
526 // Don't care operations: undefined if the input is a nan.
527 SETFALSE2, // 1 X 0 0 0 Always false (always folded)
528 SETEQ, // 1 X 0 0 1 True if equal
529 SETGT, // 1 X 0 1 0 True if greater than
530 SETGE, // 1 X 0 1 1 True if greater than or equal
531 SETLT, // 1 X 1 0 0 True if less than
532 SETLE, // 1 X 1 0 1 True if less than or equal
533 SETNE, // 1 X 1 1 0 True if not equal
534 SETTRUE2, // 1 X 1 1 1 Always true (always folded)
536 SETCC_INVALID // Marker value.
539 /// isSignedIntSetCC - Return true if this is a setcc instruction that
540 /// performs a signed comparison when used with integer operands.
541 inline bool isSignedIntSetCC(CondCode Code) {
542 return Code == SETGT || Code == SETGE || Code == SETLT || Code == SETLE;
545 /// isUnsignedIntSetCC - Return true if this is a setcc instruction that
546 /// performs an unsigned comparison when used with integer operands.
547 inline bool isUnsignedIntSetCC(CondCode Code) {
548 return Code == SETUGT || Code == SETUGE || Code == SETULT || Code == SETULE;
551 /// isTrueWhenEqual - Return true if the specified condition returns true if
552 /// the two operands to the condition are equal. Note that if one of the two
553 /// operands is a NaN, this value is meaningless.
554 inline bool isTrueWhenEqual(CondCode Cond) {
555 return ((int)Cond & 1) != 0;
558 /// getUnorderedFlavor - This function returns 0 if the condition is always
559 /// false if an operand is a NaN, 1 if the condition is always true if the
560 /// operand is a NaN, and 2 if the condition is undefined if the operand is a
562 inline unsigned getUnorderedFlavor(CondCode Cond) {
563 return ((int)Cond >> 3) & 3;
566 /// getSetCCInverse - Return the operation corresponding to !(X op Y), where
567 /// 'op' is a valid SetCC operation.
568 CondCode getSetCCInverse(CondCode Operation, bool isInteger);
570 /// getSetCCSwappedOperands - Return the operation corresponding to (Y op X)
571 /// when given the operation for (X op Y).
572 CondCode getSetCCSwappedOperands(CondCode Operation);
574 /// getSetCCOrOperation - Return the result of a logical OR between different
575 /// comparisons of identical values: ((X op1 Y) | (X op2 Y)). This
576 /// function returns SETCC_INVALID if it is not possible to represent the
577 /// resultant comparison.
578 CondCode getSetCCOrOperation(CondCode Op1, CondCode Op2, bool isInteger);
580 /// getSetCCAndOperation - Return the result of a logical AND between
581 /// different comparisons of identical values: ((X op1 Y) & (X op2 Y)). This
582 /// function returns SETCC_INVALID if it is not possible to represent the
583 /// resultant comparison.
584 CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, bool isInteger);
585 } // end llvm::ISD namespace
588 //===----------------------------------------------------------------------===//
589 /// SDOperand - Unlike LLVM values, Selection DAG nodes may return multiple
590 /// values as the result of a computation. Many nodes return multiple values,
591 /// from loads (which define a token and a return value) to ADDC (which returns
592 /// a result and a carry value), to calls (which may return an arbitrary number
595 /// As such, each use of a SelectionDAG computation must indicate the node that
596 /// computes it as well as which return value to use from that node. This pair
597 /// of information is represented with the SDOperand value type.
601 SDNode *Val; // The node defining the value we are using.
602 unsigned ResNo; // Which return value of the node we are using.
604 SDOperand() : Val(0) {}
605 SDOperand(SDNode *val, unsigned resno) : Val(val), ResNo(resno) {}
607 bool operator==(const SDOperand &O) const {
608 return Val == O.Val && ResNo == O.ResNo;
610 bool operator!=(const SDOperand &O) const {
611 return !operator==(O);
613 bool operator<(const SDOperand &O) const {
614 return Val < O.Val || (Val == O.Val && ResNo < O.ResNo);
617 SDOperand getValue(unsigned R) const {
618 return SDOperand(Val, R);
621 // isOperand - Return true if this node is an operand of N.
622 bool isOperand(SDNode *N) const;
624 /// getValueType - Return the ValueType of the referenced return value.
626 inline MVT::ValueType getValueType() const;
628 // Forwarding methods - These forward to the corresponding methods in SDNode.
629 inline unsigned getOpcode() const;
630 inline unsigned getNodeDepth() const;
631 inline unsigned getNumOperands() const;
632 inline const SDOperand &getOperand(unsigned i) const;
633 inline bool isTargetOpcode() const;
634 inline unsigned getTargetOpcode() const;
636 /// hasOneUse - Return true if there is exactly one operation using this
637 /// result value of the defining operator.
638 inline bool hasOneUse() const;
642 /// simplify_type specializations - Allow casting operators to work directly on
643 /// SDOperands as if they were SDNode*'s.
644 template<> struct simplify_type<SDOperand> {
645 typedef SDNode* SimpleType;
646 static SimpleType getSimplifiedValue(const SDOperand &Val) {
647 return static_cast<SimpleType>(Val.Val);
650 template<> struct simplify_type<const SDOperand> {
651 typedef SDNode* SimpleType;
652 static SimpleType getSimplifiedValue(const SDOperand &Val) {
653 return static_cast<SimpleType>(Val.Val);
658 /// SDNode - Represents one node in the SelectionDAG.
661 /// NodeType - The operation that this node performs.
663 unsigned short NodeType;
665 /// NodeDepth - Node depth is defined as MAX(Node depth of children)+1. This
666 /// means that leaves have a depth of 1, things that use only leaves have a
668 unsigned short NodeDepth;
670 /// OperandList - The values that are used by this operation.
672 SDOperand *OperandList;
674 /// ValueList - The types of the values this node defines. SDNode's may
675 /// define multiple values simultaneously.
676 MVT::ValueType *ValueList;
678 /// NumOperands/NumValues - The number of entries in the Operand/Value list.
679 unsigned short NumOperands, NumValues;
681 /// Prev/Next pointers - These pointers form the linked list of of the
682 /// AllNodes list in the current DAG.
684 friend struct ilist_traits<SDNode>;
686 /// Uses - These are all of the SDNode's that use a value produced by this
688 std::vector<SDNode*> Uses;
691 assert(NumOperands == 0 && "Operand list not cleared before deletion");
694 //===--------------------------------------------------------------------===//
697 unsigned getOpcode() const { return NodeType; }
698 bool isTargetOpcode() const { return NodeType >= ISD::BUILTIN_OP_END; }
699 unsigned getTargetOpcode() const {
700 assert(isTargetOpcode() && "Not a target opcode!");
701 return NodeType - ISD::BUILTIN_OP_END;
704 size_t use_size() const { return Uses.size(); }
705 bool use_empty() const { return Uses.empty(); }
706 bool hasOneUse() const { return Uses.size() == 1; }
708 /// getNodeDepth - Return the distance from this node to the leaves in the
709 /// graph. The leaves have a depth of 1.
710 unsigned getNodeDepth() const { return NodeDepth; }
712 typedef std::vector<SDNode*>::const_iterator use_iterator;
713 use_iterator use_begin() const { return Uses.begin(); }
714 use_iterator use_end() const { return Uses.end(); }
716 /// hasNUsesOfValue - Return true if there are exactly NUSES uses of the
717 /// indicated value. This method ignores uses of other values defined by this
719 bool hasNUsesOfValue(unsigned NUses, unsigned Value) const;
721 // isOnlyUse - Return true if this node is the only use of N.
722 bool isOnlyUse(SDNode *N) const;
724 // isOperand - Return true if this node is an operand of N.
725 bool isOperand(SDNode *N) const;
727 /// getNumOperands - Return the number of values used by this operation.
729 unsigned getNumOperands() const { return NumOperands; }
731 const SDOperand &getOperand(unsigned Num) const {
732 assert(Num < NumOperands && "Invalid child # of SDNode!");
733 return OperandList[Num];
735 typedef const SDOperand* op_iterator;
736 op_iterator op_begin() const { return OperandList; }
737 op_iterator op_end() const { return OperandList+NumOperands; }
740 /// getNumValues - Return the number of values defined/returned by this
743 unsigned getNumValues() const { return NumValues; }
745 /// getValueType - Return the type of a specified result.
747 MVT::ValueType getValueType(unsigned ResNo) const {
748 assert(ResNo < NumValues && "Illegal result number!");
749 return ValueList[ResNo];
752 typedef const MVT::ValueType* value_iterator;
753 value_iterator value_begin() const { return ValueList; }
754 value_iterator value_end() const { return ValueList+NumValues; }
756 /// getOperationName - Return the opcode of this operation for printing.
758 const char* getOperationName(const SelectionDAG *G = 0) const;
760 void dump(const SelectionDAG *G) const;
762 static bool classof(const SDNode *) { return true; }
765 friend class SelectionDAG;
767 /// getValueTypeList - Return a pointer to the specified value type.
769 static MVT::ValueType *getValueTypeList(MVT::ValueType VT);
771 SDNode(unsigned NT, MVT::ValueType VT) : NodeType(NT), NodeDepth(1) {
772 OperandList = 0; NumOperands = 0;
773 ValueList = getValueTypeList(VT);
777 SDNode(unsigned NT, SDOperand Op)
778 : NodeType(NT), NodeDepth(Op.Val->getNodeDepth()+1) {
779 OperandList = new SDOperand[1];
782 Op.Val->Uses.push_back(this);
787 SDNode(unsigned NT, SDOperand N1, SDOperand N2)
789 if (N1.Val->getNodeDepth() > N2.Val->getNodeDepth())
790 NodeDepth = N1.Val->getNodeDepth()+1;
792 NodeDepth = N2.Val->getNodeDepth()+1;
793 OperandList = new SDOperand[2];
797 N1.Val->Uses.push_back(this); N2.Val->Uses.push_back(this);
802 SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3)
804 unsigned ND = N1.Val->getNodeDepth();
805 if (ND < N2.Val->getNodeDepth())
806 ND = N2.Val->getNodeDepth();
807 if (ND < N3.Val->getNodeDepth())
808 ND = N3.Val->getNodeDepth();
811 OperandList = new SDOperand[3];
817 N1.Val->Uses.push_back(this); N2.Val->Uses.push_back(this);
818 N3.Val->Uses.push_back(this);
823 SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4)
825 unsigned ND = N1.Val->getNodeDepth();
826 if (ND < N2.Val->getNodeDepth())
827 ND = N2.Val->getNodeDepth();
828 if (ND < N3.Val->getNodeDepth())
829 ND = N3.Val->getNodeDepth();
830 if (ND < N4.Val->getNodeDepth())
831 ND = N4.Val->getNodeDepth();
834 OperandList = new SDOperand[4];
841 N1.Val->Uses.push_back(this); N2.Val->Uses.push_back(this);
842 N3.Val->Uses.push_back(this); N4.Val->Uses.push_back(this);
847 SDNode(unsigned Opc, const std::vector<SDOperand> &Nodes) : NodeType(Opc) {
848 NumOperands = Nodes.size();
849 OperandList = new SDOperand[NumOperands];
852 for (unsigned i = 0, e = Nodes.size(); i != e; ++i) {
853 OperandList[i] = Nodes[i];
854 SDNode *N = OperandList[i].Val;
855 N->Uses.push_back(this);
856 if (ND < N->getNodeDepth()) ND = N->getNodeDepth();
864 /// MorphNodeTo - This clears the return value and operands list, and sets the
865 /// opcode of the node to the specified value. This should only be used by
866 /// the SelectionDAG class.
867 void MorphNodeTo(unsigned Opc) {
872 // Clear the operands list, updating used nodes to remove this from their
874 for (op_iterator I = op_begin(), E = op_end(); I != E; ++I)
875 I->Val->removeUser(this);
876 delete [] OperandList;
881 void setValueTypes(MVT::ValueType VT) {
882 assert(NumValues == 0 && "Should not have values yet!");
883 ValueList = getValueTypeList(VT);
886 void setValueTypes(MVT::ValueType *List, unsigned NumVal) {
887 assert(NumValues == 0 && "Should not have values yet!");
892 void setOperands(SDOperand Op0) {
893 assert(NumOperands == 0 && "Should not have operands yet!");
894 OperandList = new SDOperand[1];
895 OperandList[0] = Op0;
897 Op0.Val->Uses.push_back(this);
899 void setOperands(SDOperand Op0, SDOperand Op1) {
900 assert(NumOperands == 0 && "Should not have operands yet!");
901 OperandList = new SDOperand[2];
902 OperandList[0] = Op0;
903 OperandList[1] = Op1;
905 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
907 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2) {
908 assert(NumOperands == 0 && "Should not have operands yet!");
909 OperandList = new SDOperand[3];
910 OperandList[0] = Op0;
911 OperandList[1] = Op1;
912 OperandList[2] = Op2;
914 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
915 Op2.Val->Uses.push_back(this);
917 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3) {
918 assert(NumOperands == 0 && "Should not have operands yet!");
919 OperandList = new SDOperand[4];
920 OperandList[0] = Op0;
921 OperandList[1] = Op1;
922 OperandList[2] = Op2;
923 OperandList[3] = Op3;
925 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
926 Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
928 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
930 assert(NumOperands == 0 && "Should not have operands yet!");
931 OperandList = new SDOperand[5];
932 OperandList[0] = Op0;
933 OperandList[1] = Op1;
934 OperandList[2] = Op2;
935 OperandList[3] = Op3;
936 OperandList[4] = Op4;
938 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
939 Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
940 Op4.Val->Uses.push_back(this);
942 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
943 SDOperand Op4, SDOperand Op5) {
944 assert(NumOperands == 0 && "Should not have operands yet!");
945 OperandList = new SDOperand[6];
946 OperandList[0] = Op0;
947 OperandList[1] = Op1;
948 OperandList[2] = Op2;
949 OperandList[3] = Op3;
950 OperandList[4] = Op4;
951 OperandList[5] = Op5;
953 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
954 Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
955 Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
957 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
958 SDOperand Op4, SDOperand Op5, SDOperand Op6) {
959 assert(NumOperands == 0 && "Should not have operands yet!");
960 OperandList = new SDOperand[7];
961 OperandList[0] = Op0;
962 OperandList[1] = Op1;
963 OperandList[2] = Op2;
964 OperandList[3] = Op3;
965 OperandList[4] = Op4;
966 OperandList[5] = Op5;
967 OperandList[6] = Op6;
969 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
970 Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
971 Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
972 Op6.Val->Uses.push_back(this);
974 void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
975 SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7) {
976 assert(NumOperands == 0 && "Should not have operands yet!");
977 OperandList = new SDOperand[8];
978 OperandList[0] = Op0;
979 OperandList[1] = Op1;
980 OperandList[2] = Op2;
981 OperandList[3] = Op3;
982 OperandList[4] = Op4;
983 OperandList[5] = Op5;
984 OperandList[6] = Op6;
985 OperandList[7] = Op7;
987 Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
988 Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
989 Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
990 Op6.Val->Uses.push_back(this); Op7.Val->Uses.push_back(this);
993 void addUser(SDNode *User) {
994 Uses.push_back(User);
996 void removeUser(SDNode *User) {
997 // Remove this user from the operand's use list.
998 for (unsigned i = Uses.size(); ; --i) {
999 assert(i != 0 && "Didn't find user!");
1000 if (Uses[i-1] == User) {
1001 Uses[i-1] = Uses.back();
1010 // Define inline functions from the SDOperand class.
1012 inline unsigned SDOperand::getOpcode() const {
1013 return Val->getOpcode();
1015 inline unsigned SDOperand::getNodeDepth() const {
1016 return Val->getNodeDepth();
1018 inline MVT::ValueType SDOperand::getValueType() const {
1019 return Val->getValueType(ResNo);
1021 inline unsigned SDOperand::getNumOperands() const {
1022 return Val->getNumOperands();
1024 inline const SDOperand &SDOperand::getOperand(unsigned i) const {
1025 return Val->getOperand(i);
1027 inline bool SDOperand::isTargetOpcode() const {
1028 return Val->isTargetOpcode();
1030 inline unsigned SDOperand::getTargetOpcode() const {
1031 return Val->getTargetOpcode();
1033 inline bool SDOperand::hasOneUse() const {
1034 return Val->hasNUsesOfValue(1, ResNo);
1037 /// HandleSDNode - This class is used to form a handle around another node that
1038 /// is persistant and is updated across invocations of replaceAllUsesWith on its
1039 /// operand. This node should be directly created by end-users and not added to
1040 /// the AllNodes list.
1041 class HandleSDNode : public SDNode {
1043 HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
1045 MorphNodeTo(ISD::HANDLENODE); // Drops operand uses.
1048 SDOperand getValue() const { return getOperand(0); }
1051 class StringSDNode : public SDNode {
1054 friend class SelectionDAG;
1055 StringSDNode(const std::string &val)
1056 : SDNode(ISD::STRING, MVT::Other), Value(val) {
1059 const std::string &getValue() const { return Value; }
1060 static bool classof(const StringSDNode *) { return true; }
1061 static bool classof(const SDNode *N) {
1062 return N->getOpcode() == ISD::STRING;
1066 class ConstantSDNode : public SDNode {
1069 friend class SelectionDAG;
1070 ConstantSDNode(bool isTarget, uint64_t val, MVT::ValueType VT)
1071 : SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, VT), Value(val) {
1075 uint64_t getValue() const { return Value; }
1077 int64_t getSignExtended() const {
1078 unsigned Bits = MVT::getSizeInBits(getValueType(0));
1079 return ((int64_t)Value << (64-Bits)) >> (64-Bits);
1082 bool isNullValue() const { return Value == 0; }
1083 bool isAllOnesValue() const {
1084 return Value == MVT::getIntVTBitMask(getValueType(0));
1087 static bool classof(const ConstantSDNode *) { return true; }
1088 static bool classof(const SDNode *N) {
1089 return N->getOpcode() == ISD::Constant ||
1090 N->getOpcode() == ISD::TargetConstant;
1094 class ConstantFPSDNode : public SDNode {
1097 friend class SelectionDAG;
1098 ConstantFPSDNode(bool isTarget, double val, MVT::ValueType VT)
1099 : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, VT),
1104 double getValue() const { return Value; }
1106 /// isExactlyValue - We don't rely on operator== working on double values, as
1107 /// it returns true for things that are clearly not equal, like -0.0 and 0.0.
1108 /// As such, this method can be used to do an exact bit-for-bit comparison of
1109 /// two floating point values.
1110 bool isExactlyValue(double V) const;
1112 static bool classof(const ConstantFPSDNode *) { return true; }
1113 static bool classof(const SDNode *N) {
1114 return N->getOpcode() == ISD::ConstantFP ||
1115 N->getOpcode() == ISD::TargetConstantFP;
1119 class GlobalAddressSDNode : public SDNode {
1120 GlobalValue *TheGlobal;
1123 friend class SelectionDAG;
1124 GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
1126 : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT),
1128 TheGlobal = const_cast<GlobalValue*>(GA);
1132 GlobalValue *getGlobal() const { return TheGlobal; }
1133 int getOffset() const { return Offset; }
1135 static bool classof(const GlobalAddressSDNode *) { return true; }
1136 static bool classof(const SDNode *N) {
1137 return N->getOpcode() == ISD::GlobalAddress ||
1138 N->getOpcode() == ISD::TargetGlobalAddress;
1143 class FrameIndexSDNode : public SDNode {
1146 friend class SelectionDAG;
1147 FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg)
1148 : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, VT), FI(fi) {}
1151 int getIndex() const { return FI; }
1153 static bool classof(const FrameIndexSDNode *) { return true; }
1154 static bool classof(const SDNode *N) {
1155 return N->getOpcode() == ISD::FrameIndex ||
1156 N->getOpcode() == ISD::TargetFrameIndex;
1160 class ConstantPoolSDNode : public SDNode {
1165 friend class SelectionDAG;
1166 ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT,
1168 : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT),
1169 C(c), Offset(o), Alignment(0) {}
1170 ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, int o,
1172 : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT),
1173 C(c), Offset(o), Alignment(Align) {}
1176 Constant *get() const { return C; }
1177 int getOffset() const { return Offset; }
1179 // Return the alignment of this constant pool object, which is either 0 (for
1180 // default alignment) or log2 of the desired value.
1181 unsigned getAlignment() const { return Alignment; }
1183 static bool classof(const ConstantPoolSDNode *) { return true; }
1184 static bool classof(const SDNode *N) {
1185 return N->getOpcode() == ISD::ConstantPool ||
1186 N->getOpcode() == ISD::TargetConstantPool;
1190 class BasicBlockSDNode : public SDNode {
1191 MachineBasicBlock *MBB;
1193 friend class SelectionDAG;
1194 BasicBlockSDNode(MachineBasicBlock *mbb)
1195 : SDNode(ISD::BasicBlock, MVT::Other), MBB(mbb) {}
1198 MachineBasicBlock *getBasicBlock() const { return MBB; }
1200 static bool classof(const BasicBlockSDNode *) { return true; }
1201 static bool classof(const SDNode *N) {
1202 return N->getOpcode() == ISD::BasicBlock;
1206 class SrcValueSDNode : public SDNode {
1210 friend class SelectionDAG;
1211 SrcValueSDNode(const Value* v, int o)
1212 : SDNode(ISD::SRCVALUE, MVT::Other), V(v), offset(o) {}
1215 const Value *getValue() const { return V; }
1216 int getOffset() const { return offset; }
1218 static bool classof(const SrcValueSDNode *) { return true; }
1219 static bool classof(const SDNode *N) {
1220 return N->getOpcode() == ISD::SRCVALUE;
1225 class RegisterSDNode : public SDNode {
1228 friend class SelectionDAG;
1229 RegisterSDNode(unsigned reg, MVT::ValueType VT)
1230 : SDNode(ISD::Register, VT), Reg(reg) {}
1233 unsigned getReg() const { return Reg; }
1235 static bool classof(const RegisterSDNode *) { return true; }
1236 static bool classof(const SDNode *N) {
1237 return N->getOpcode() == ISD::Register;
1241 class ExternalSymbolSDNode : public SDNode {
1244 friend class SelectionDAG;
1245 ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT::ValueType VT)
1246 : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, VT),
1251 const char *getSymbol() const { return Symbol; }
1253 static bool classof(const ExternalSymbolSDNode *) { return true; }
1254 static bool classof(const SDNode *N) {
1255 return N->getOpcode() == ISD::ExternalSymbol ||
1256 N->getOpcode() == ISD::TargetExternalSymbol;
1260 class CondCodeSDNode : public SDNode {
1261 ISD::CondCode Condition;
1263 friend class SelectionDAG;
1264 CondCodeSDNode(ISD::CondCode Cond)
1265 : SDNode(ISD::CONDCODE, MVT::Other), Condition(Cond) {
1269 ISD::CondCode get() const { return Condition; }
1271 static bool classof(const CondCodeSDNode *) { return true; }
1272 static bool classof(const SDNode *N) {
1273 return N->getOpcode() == ISD::CONDCODE;
1277 /// VTSDNode - This class is used to represent MVT::ValueType's, which are used
1278 /// to parameterize some operations.
1279 class VTSDNode : public SDNode {
1280 MVT::ValueType ValueType;
1282 friend class SelectionDAG;
1283 VTSDNode(MVT::ValueType VT)
1284 : SDNode(ISD::VALUETYPE, MVT::Other), ValueType(VT) {}
1287 MVT::ValueType getVT() const { return ValueType; }
1289 static bool classof(const VTSDNode *) { return true; }
1290 static bool classof(const SDNode *N) {
1291 return N->getOpcode() == ISD::VALUETYPE;
1296 class SDNodeIterator : public forward_iterator<SDNode, ptrdiff_t> {
1300 SDNodeIterator(SDNode *N, unsigned Op) : Node(N), Operand(Op) {}
1302 bool operator==(const SDNodeIterator& x) const {
1303 return Operand == x.Operand;
1305 bool operator!=(const SDNodeIterator& x) const { return !operator==(x); }
1307 const SDNodeIterator &operator=(const SDNodeIterator &I) {
1308 assert(I.Node == Node && "Cannot assign iterators to two different nodes!");
1309 Operand = I.Operand;
1313 pointer operator*() const {
1314 return Node->getOperand(Operand).Val;
1316 pointer operator->() const { return operator*(); }
1318 SDNodeIterator& operator++() { // Preincrement
1322 SDNodeIterator operator++(int) { // Postincrement
1323 SDNodeIterator tmp = *this; ++*this; return tmp;
1326 static SDNodeIterator begin(SDNode *N) { return SDNodeIterator(N, 0); }
1327 static SDNodeIterator end (SDNode *N) {
1328 return SDNodeIterator(N, N->getNumOperands());
1331 unsigned getOperand() const { return Operand; }
1332 const SDNode *getNode() const { return Node; }
1335 template <> struct GraphTraits<SDNode*> {
1336 typedef SDNode NodeType;
1337 typedef SDNodeIterator ChildIteratorType;
1338 static inline NodeType *getEntryNode(SDNode *N) { return N; }
1339 static inline ChildIteratorType child_begin(NodeType *N) {
1340 return SDNodeIterator::begin(N);
1342 static inline ChildIteratorType child_end(NodeType *N) {
1343 return SDNodeIterator::end(N);
1348 struct ilist_traits<SDNode> {
1349 static SDNode *getPrev(const SDNode *N) { return N->Prev; }
1350 static SDNode *getNext(const SDNode *N) { return N->Next; }
1352 static void setPrev(SDNode *N, SDNode *Prev) { N->Prev = Prev; }
1353 static void setNext(SDNode *N, SDNode *Next) { N->Next = Next; }
1355 static SDNode *createSentinel() {
1356 return new SDNode(ISD::EntryToken, MVT::Other);
1358 static void destroySentinel(SDNode *N) { delete N; }
1359 //static SDNode *createNode(const SDNode &V) { return new SDNode(V); }
1362 void addNodeToList(SDNode *NTy) {}
1363 void removeNodeFromList(SDNode *NTy) {}
1364 void transferNodesFromList(iplist<SDNode, ilist_traits> &L2,
1365 const ilist_iterator<SDNode> &X,
1366 const ilist_iterator<SDNode> &Y) {}
1369 } // end llvm namespace