Add convenience overloads of SelectionDAG::getNode that take a SDVTList
authorDan Gohman <gohman@apple.com>
Mon, 8 Oct 2007 15:49:58 +0000 (15:49 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 8 Oct 2007 15:49:58 +0000 (15:49 +0000)
and individual SDOperand operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42753 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 395bf14918d85f93bae6dfc4e9d7028cc4f36548..dd2e99d9022eb1800182c702ed751aefa5860161 100644 (file)
@@ -287,6 +287,17 @@ public:
                     const SDOperand *Ops, unsigned NumOps);
   SDOperand getNode(unsigned Opcode, const MVT::ValueType *VTs, unsigned NumVTs,
                     const SDOperand *Ops, unsigned NumOps);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs, SDOperand N);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs,
+                    SDOperand N1, SDOperand N2);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs,
+                    SDOperand N1, SDOperand N2, SDOperand N3);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs,
+                    SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4);
+  SDOperand getNode(unsigned Opcode, SDVTList VTs,
+                    SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4,
+                    SDOperand N5);
   SDOperand getNode(unsigned Opcode, SDVTList VTs,
                     const SDOperand *Ops, unsigned NumOps);
   
index 6a9b14907a05175434f6e06cd1c18317c5a25bea..bb5f1b14ab21fc051344cdcb4717e635d0f0e964 100644 (file)
@@ -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);