// an unsigned/signed value of type i[2*n], then return the top part.
MULHU, MULHS,
- // Bitwise operators.
- AND, OR, XOR, SHL, SRA, SRL,
+ // Bitwise operators - logical and, logical or, logical xor, shift left,
+ // shift right algebraic (shift in sign bits), shift right logical (shift in
+ // zeroes), rotate left, rotate right, and byteswap.
+ AND, OR, XOR, SHL, SRA, SRL, ROTL, ROTR, BSWAP,
// Counting operators
CTTZ, CTLZ, CTPOP,
// BIT_CONVERT - Theis operator converts between integer and FP values, as
// if one was stored to memory as integer and the other was loaded from the
- // same address. The source and result are required to have the same bit
- // size (e.g. f32 <-> i32). This can also be used for int-to-int or
- // fp-to-fp conversions, but that is a noop, deleted by getNode().
+ // same address (or equivalently for vector format conversions, etc). The
+ // source and result are required to have the same bit size (e.g.
+ // f32 <-> i32). This can also be used for int-to-int or fp-to-fp
+ // conversions, but that is a noop, deleted by getNode().
BIT_CONVERT,
// FNEG, FABS, FSQRT, FSIN, FCOS - Perform unary floating point negation,
CALL,
TAILCALL,
+ // STACKSAVE - STACKSAVE has one operand, an input chain. It produces a
+ // value, the same type as the pointer type for the system, and an output
+ // chain.
+ STACKSAVE,
+
+ // STACKRESTORE has two operands, an input chain and a pointer to restore to
+ // it returns an output chain.
+ STACKRESTORE,
+
// MEMSET/MEMCPY/MEMMOVE - The first operand is the chain, and the rest
// correspond to the operands of the LLVM intrinsic functions. The only
// result is a token chain. The alignment argument is guaranteed to be a
// target and not touched by the DAG optimizers.
CALLSEQ_START, // Beginning of a call sequence
CALLSEQ_END, // End of a call sequence
+
+ // VAARG - VAARG has three operands: an input chain, a pointer, and a
+ // SRCVALUE. It returns a pair of values: the vaarg value and a new chain.
+ VAARG,
+
+ // VACOPY - VACOPY has five operands: an input chain, a destination pointer,
+ // a source pointer, a SRCVALUE for the destination, and a SRCVALUE for the
+ // source.
+ VACOPY,
+
+ // VAEND, VASTART - VAEND and VASTART have three operands: an input chain, a
+ // pointer, and a SRCVALUE.
+ VAEND, VASTART,
// SRCVALUE - This corresponds to a Value*, and is used to associate memory
// locations with their value. This allows one use alias analysis
LOCATION,
// DEBUG_LOC - This node is used to represent source line information
- // embedded in the code. It takes token chain as input, then a line number,
- // then a column then a file id (provided by MachineDebugInfo. It produces
- // a token chain as output.
+ // embedded in the code. It takes a token chain as input, then a line
+ // number, then a column then a file id (provided by MachineDebugInfo.) It
+ // produces a token chain as output.
DEBUG_LOC,
+ // DEBUG_LABEL - This node is used to mark a location in the code where a
+ // label should be generated for use by the debug information. It takes a
+ // token chain as input and then a unique id (provided by MachineDebugInfo.)
+ // It produces a token chain as output.
+ DEBUG_LABEL,
+
// BUILTIN_OP_END - This must be the last enum value in this list.
BUILTIN_OP_END,
};
/// setAdjCallChain - This method should only be used by the legalizer.
void setAdjCallChain(SDOperand N);
+ void setAdjCallFlag(SDOperand N);
protected:
friend class SelectionDAG;
Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
}
+ void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
+ SDOperand Op4, SDOperand Op5, SDOperand Op6) {
+ assert(NumOperands == 0 && "Should not have operands yet!");
+ OperandList = new SDOperand[7];
+ OperandList[0] = Op0;
+ OperandList[1] = Op1;
+ OperandList[2] = Op2;
+ OperandList[3] = Op3;
+ OperandList[4] = Op4;
+ OperandList[5] = Op5;
+ OperandList[6] = Op6;
+ NumOperands = 7;
+ Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
+ Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
+ Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
+ Op6.Val->Uses.push_back(this);
+ }
+ void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3,
+ SDOperand Op4, SDOperand Op5, SDOperand Op6, SDOperand Op7) {
+ assert(NumOperands == 0 && "Should not have operands yet!");
+ OperandList = new SDOperand[8];
+ OperandList[0] = Op0;
+ OperandList[1] = Op1;
+ OperandList[2] = Op2;
+ OperandList[3] = Op3;
+ OperandList[4] = Op4;
+ OperandList[5] = Op5;
+ OperandList[6] = Op6;
+ OperandList[7] = Op7;
+ NumOperands = 8;
+ Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this);
+ Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this);
+ Op4.Val->Uses.push_back(this); Op5.Val->Uses.push_back(this);
+ Op6.Val->Uses.push_back(this); Op7.Val->Uses.push_back(this);
+ }
+
void addUser(SDNode *User) {
Uses.push_back(User);
}