aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-09 20:20:18 +0000
committerChris Lattner <sabre@nondot.org>2005-08-09 20:20:18 +0000
commit7cf7e3f33f25544d08492d47cc8a1cbba25dc8d7 (patch)
treeec09113f62baccb467fd76610be42081f21cc00d /include/llvm/CodeGen/SelectionDAGNodes.h
parent59b21c25d470c58e0575d5b2f31dd703fa7681ae (diff)
Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the
CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index c666ab05e2..898041d6b1 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -55,7 +55,7 @@ namespace ISD {
// Various leaf nodes.
Constant, ConstantFP, GlobalAddress, FrameIndex, ConstantPool,
- BasicBlock, ExternalSymbol, VALUETYPE,
+ BasicBlock, ExternalSymbol, VALUETYPE, CONDCODE,
// CopyToReg - This node has chain and child nodes, and an associated
// register number. The instruction selector must guarantee that the value
@@ -107,9 +107,9 @@ namespace ISD {
SELECT,
// SetCC operator - This evaluates to a boolean (i1) true value if the
- // condition is true. These nodes are instances of the
- // SetCCSDNode class, which contains the condition code as extra
- // state.
+ // condition is true. The operands to this are the left and right operands
+ // to compare (ops #0, and #1) and the condition code to compare them with
+ // (op #2) as a CondCodeSDNode.
SETCC,
// ADD_PARTS/SUB_PARTS - These operators take two logical operands which are
@@ -827,20 +827,20 @@ public:
}
};
-class SetCCSDNode : public SDNode {
+class CondCodeSDNode : public SDNode {
ISD::CondCode Condition;
protected:
friend class SelectionDAG;
- SetCCSDNode(ISD::CondCode Cond, SDOperand LHS, SDOperand RHS)
- : SDNode(ISD::SETCC, LHS, RHS), Condition(Cond) {
+ CondCodeSDNode(ISD::CondCode Cond)
+ : SDNode(ISD::CONDCODE, MVT::Other), Condition(Cond) {
}
public:
- ISD::CondCode getCondition() const { return Condition; }
+ ISD::CondCode get() const { return Condition; }
- static bool classof(const SetCCSDNode *) { return true; }
+ static bool classof(const CondCodeSDNode *) { return true; }
static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::SETCC;
+ return N->getOpcode() == ISD::CONDCODE;
}
};