diff options
author | Dan Gohman <gohman@apple.com> | 2007-10-08 15:49:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-10-08 15:49:58 +0000 |
commit | 08ce9769718354e6767d3815e4c255e7c9fc0a46 (patch) | |
tree | b5a1749b127542844b673d94bae6ec2467290cd9 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 82a13c9c4811e40d0ff858c508cb54d672ee926e (diff) |
Add convenience overloads of SelectionDAG::getNode that take a SDVTList
and individual SDOperand operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 6a9b14907a..bb5f1b14ab 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2595,6 +2595,42 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, return SDOperand(N, 0); } +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList) { + return getNode(Opcode, VTList, 0, 0); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, + SDOperand N1) { + SDOperand Ops[] = { N1 }; + return getNode(Opcode, VTList, Ops, 1); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, + SDOperand N1, SDOperand N2) { + SDOperand Ops[] = { N1, N2 }; + return getNode(Opcode, VTList, Ops, 2); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, + SDOperand N1, SDOperand N2, SDOperand N3) { + SDOperand Ops[] = { N1, N2, N3 }; + return getNode(Opcode, VTList, Ops, 3); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, + SDOperand N1, SDOperand N2, SDOperand N3, + SDOperand N4) { + SDOperand Ops[] = { N1, N2, N3, N4 }; + return getNode(Opcode, VTList, Ops, 4); +} + +SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList, + SDOperand N1, SDOperand N2, SDOperand N3, + SDOperand N4, SDOperand N5) { + SDOperand Ops[] = { N1, N2, N3, N4, N5 }; + return getNode(Opcode, VTList, Ops, 5); +} + SDVTList SelectionDAG::getVTList(MVT::ValueType VT) { if (!MVT::isExtendedVT(VT)) return makeVTList(SDNode::getValueTypeList(VT), 1); |