eliminate the SDNode::setValueTypes method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33876 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 5ed5822..c154d79 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -939,8 +939,7 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new SDNode(Opcode, 0, 0);
-  N->setValueTypes(SDNode::getSDVTList(VT));
+  SDNode *N = new SDNode(Opcode, SDNode::getSDVTList(VT), 0, 0);
   CSEMap.InsertNode(N, IP);
   
   AllNodes.push_back(N);
@@ -1121,12 +1120,10 @@
     void *IP = 0;
     if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
       return SDOperand(E, 0);
-    N = new SDNode(Opcode, Ops, 1);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 1);
     CSEMap.InsertNode(N, IP);
   } else {
-    N = new SDNode(Opcode, Ops, 1);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 1);
   }
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1423,12 +1420,10 @@
     void *IP = 0;
     if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
       return SDOperand(E, 0);
-    N = new SDNode(Opcode, Ops, 2);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 2);
     CSEMap.InsertNode(N, IP);
   } else {
-    N = new SDNode(Opcode, Ops, 2);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 2);
   }
 
   AllNodes.push_back(N);
@@ -1482,12 +1477,10 @@
     void *IP = 0;
     if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
       return SDOperand(E, 0);
-    N = new SDNode(Opcode, Ops, 3);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 3);
     CSEMap.InsertNode(N, IP);
   } else {
-    N = new SDNode(Opcode, Ops, 3);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, 3);
   }
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1528,10 +1521,9 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new LoadSDNode(Ops, ISD::UNINDEXED,
+  SDNode *N = new LoadSDNode(Ops, VTs, ISD::UNINDEXED,
                              ISD::NON_EXTLOAD, VT, SV, SVOffset, Alignment,
                              isVolatile);
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1573,9 +1565,8 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new LoadSDNode(Ops, ISD::UNINDEXED, ExtType, EVT,
+  SDNode *N = new LoadSDNode(Ops, VTs, ISD::UNINDEXED, ExtType, EVT,
                              SV, SVOffset, Alignment, isVolatile);
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1602,11 +1593,10 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new LoadSDNode(Ops, AM,
+  SDNode *N = new LoadSDNode(Ops, VTs, AM,
                              LD->getExtensionType(), LD->getLoadedVT(),
                              LD->getSrcValue(), LD->getSrcValueOffset(),
                              LD->getAlignment(), LD->isVolatile());
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1642,9 +1632,8 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new StoreSDNode(Ops, ISD::UNINDEXED, false,
+  SDNode *N = new StoreSDNode(Ops, VTs, ISD::UNINDEXED, false,
                               VT, SV, SVOffset, Alignment, isVolatile);
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1678,9 +1667,8 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new StoreSDNode(Ops, ISD::UNINDEXED, isTrunc,
+  SDNode *N = new StoreSDNode(Ops, VTs, ISD::UNINDEXED, isTrunc,
                               SVT, SV, SVOffset, Alignment, isVolatile);
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1706,11 +1694,10 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
     return SDOperand(E, 0);
-  SDNode *N = new StoreSDNode(Ops, AM,
+  SDNode *N = new StoreSDNode(Ops, VTs, AM,
                               ST->isTruncatingStore(), ST->getStoredVT(),
                               ST->getSrcValue(), ST->getSrcValueOffset(),
                               ST->getAlignment(), ST->isVolatile());
-  N->setValueTypes(VTs);
   CSEMap.InsertNode(N, IP);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1762,12 +1749,10 @@
     void *IP = 0;
     if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
       return SDOperand(E, 0);
-    N = new SDNode(Opcode, Ops, NumOps);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, NumOps);
     CSEMap.InsertNode(N, IP);
   } else {
-    N = new SDNode(Opcode, Ops, NumOps);
-    N->setValueTypes(VTs);
+    N = new SDNode(Opcode, VTs, Ops, NumOps);
   }
   AllNodes.push_back(N);
   return SDOperand(N, 0);
@@ -1824,12 +1809,10 @@
     void *IP = 0;
     if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
       return SDOperand(E, 0);
-    N = new SDNode(Opcode, Ops, NumOps);
-    N->setValueTypes(VTList);
+    N = new SDNode(Opcode, VTList, Ops, NumOps);
     CSEMap.InsertNode(N, IP);
   } else {
-    N = new SDNode(Opcode, Ops, NumOps);
-    N->setValueTypes(VTList);
+    N = new SDNode(Opcode, VTList, Ops, NumOps);
   }
   AllNodes.push_back(N);
   return SDOperand(N, 0);