diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2006-01-09 18:29:18 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2006-01-09 18:29:18 +0000 |
| commit | 53a1f57fc524305b8bf620bd734ac4c92d1c4452 (patch) | |
| tree | 7d14f92a110e30797288330137ba42490013d8df | |
| parent | 7785e5b3a414b02e4a9a6c68f0b24c95d688ff02 (diff) | |
| download | bcm5719-llvm-53a1f57fc524305b8bf620bd734ac4c92d1c4452.tar.gz bcm5719-llvm-53a1f57fc524305b8bf620bd734ac4c92d1c4452.zip | |
New getNode() variants.
llvm-svn: 25156
| -rw-r--r-- | llvm/include/llvm/CodeGen/SelectionDAG.h | 65 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 14 |
2 files changed, 61 insertions, 18 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h index c82d4ca9fe5..3fd32a8a0ec 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -243,9 +243,6 @@ public: SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4, SDOperand N5); SDOperand getNode(unsigned Opcode, MVT::ValueType VT, - SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4, - SDOperand N5, SDOperand N6); - SDOperand getNode(unsigned Opcode, MVT::ValueType VT, std::vector<SDOperand> &Children); SDOperand getNode(unsigned Opcode, std::vector<MVT::ValueType> &ResultTys, std::vector<SDOperand> &Ops); @@ -357,7 +354,30 @@ public: SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op5, SDOperand Op6) { - return getNode(ISD::BUILTIN_OP_END+Opcode, VT, Op1, Op2, Op3, Op4, Op5, Op6); + std::vector<SDOperand> Ops; + Ops.reserve(6); + Ops.push_back(Op1); + Ops.push_back(Op2); + Ops.push_back(Op3); + Ops.push_back(Op4); + Ops.push_back(Op5); + Ops.push_back(Op6); + return getNode(ISD::BUILTIN_OP_END+Opcode, VT, Ops); + } + SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT, + SDOperand Op1, SDOperand Op2, SDOperand Op3, + SDOperand Op4, SDOperand Op5, SDOperand Op6, + SDOperand Op7) { + std::vector<SDOperand> Ops; + Ops.reserve(7); + Ops.push_back(Op1); + Ops.push_back(Op2); + Ops.push_back(Op3); + Ops.push_back(Op4); + Ops.push_back(Op5); + Ops.push_back(Op6); + Ops.push_back(Op7); + return getNode(ISD::BUILTIN_OP_END+Opcode, VT, Ops); } SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT, std::vector<SDOperand> &Ops) { @@ -454,6 +474,43 @@ public: Ops.push_back(Op7); return getNode(ISD::BUILTIN_OP_END+Opcode, ResultTys, Ops); } + SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT1, + MVT::ValueType VT2, MVT::ValueType VT3, + SDOperand Op1, SDOperand Op2, + SDOperand Op3, SDOperand Op4, SDOperand Op5, + SDOperand Op6) { + std::vector<MVT::ValueType> ResultTys; + ResultTys.push_back(VT1); + ResultTys.push_back(VT2); + ResultTys.push_back(VT3); + std::vector<SDOperand> Ops; + Ops.push_back(Op1); + Ops.push_back(Op2); + Ops.push_back(Op3); + Ops.push_back(Op4); + Ops.push_back(Op5); + Ops.push_back(Op6); + return getNode(ISD::BUILTIN_OP_END+Opcode, ResultTys, Ops); + } + SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT1, + MVT::ValueType VT2, MVT::ValueType VT3, + SDOperand Op1, SDOperand Op2, + SDOperand Op3, SDOperand Op4, SDOperand Op5, + SDOperand Op6, SDOperand Op7) { + std::vector<MVT::ValueType> ResultTys; + ResultTys.push_back(VT1); + ResultTys.push_back(VT2); + ResultTys.push_back(VT3); + std::vector<SDOperand> Ops; + Ops.push_back(Op1); + Ops.push_back(Op2); + Ops.push_back(Op3); + Ops.push_back(Op4); + Ops.push_back(Op5); + Ops.push_back(Op6); + Ops.push_back(Op7); + return getNode(ISD::BUILTIN_OP_END+Opcode, ResultTys, Ops); + } SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT1, MVT::ValueType VT2, std::vector<SDOperand> &Ops) { std::vector<MVT::ValueType> ResultTys; diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index b067c122ac7..5a0e2bf386e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1200,20 +1200,6 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, return getNode(Opcode, VT, Ops); } -SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, - SDOperand N1, SDOperand N2, SDOperand N3, - SDOperand N4, SDOperand N5, SDOperand N6) { - std::vector<SDOperand> Ops; - Ops.reserve(6); - Ops.push_back(N1); - Ops.push_back(N2); - Ops.push_back(N3); - Ops.push_back(N4); - Ops.push_back(N5); - Ops.push_back(N6); - return getNode(Opcode, VT, Ops); -} - // setAdjCallChain - This method changes the token chain of an // CALLSEQ_START/END node to be the specified operand. void SDNode::setAdjCallChain(SDOperand N) { |

