Nuke CodeGenInstruction's ValueType member, it is no longer used.
authorNate Begeman <natebegeman@mac.com>
Thu, 1 Dec 2005 00:12:04 +0000 (00:12 +0000)
committerNate Begeman <natebegeman@mac.com>
Thu, 1 Dec 2005 00:12:04 +0000 (00:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24556 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenInstruction.h
utils/TableGen/CodeGenTarget.cpp

index cb55d45c186be56a8e1af820639a7aa03cf45ec2..be67754d3ee7650a54d5e3cc467d308e9e662b2a 100644 (file)
@@ -39,10 +39,6 @@ namespace llvm {
       ///
       Record *Rec;
 
-      /// Ty - The MachineValueType of the operand.
-      ///
-      MVT::ValueType Ty;
-
       /// Name - If this operand was assigned a symbolic name, this is it,
       /// otherwise, it's empty.
       std::string Name;
@@ -64,11 +60,9 @@ namespace llvm {
       /// up of multiple MI operands.
       DagInit *MIOperandInfo;
 
-      OperandInfo(Record *R, MVT::ValueType T, const std::string &N,
-                  const std::string &PMN, unsigned MION, unsigned MINO,
-                  DagInit *MIOI)
-
-        : Rec(R), Ty(T), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
+      OperandInfo(Record *R, const std::string &N, const std::string &PMN, 
+                  unsigned MION, unsigned MINO, DagInit *MIOI)
+        : Rec(R), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
           MINumOperands(MINO), MIOperandInfo(MIOI) {}
     };
 
index 4580060d0ff4bcbcba5c66e9a988b79f327aaaf5..73730d18a8024d762da45e753773b4490f02d3bf 100644 (file)
@@ -276,21 +276,17 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
       throw "Illegal operand for the '" + R->getName() + "' instruction!";
 
     Record *Rec = Arg->getDef();
-    MVT::ValueType Ty;
     std::string PrintMethod = "printOperand";
     unsigned NumOps = 1;
     DagInit *MIOpInfo = 0;
-    if (Rec->isSubClassOf("RegisterClass")) {
-      Ty = getValueType(Rec->getValueAsDef("RegType"));
-    } else if (Rec->isSubClassOf("Operand")) {
-      Ty = getValueType(Rec->getValueAsDef("Type"));
+    if (Rec->isSubClassOf("Operand")) {
       PrintMethod = Rec->getValueAsString("PrintMethod");
       NumOps = Rec->getValueAsInt("NumMIOperands");
       MIOpInfo = Rec->getValueAsDag("MIOperandInfo");
     } else if (Rec->getName() == "variable_ops") {
       hasVariableNumberOfOperands = true;
       continue;
-    } else
+    } else if (!Rec->isSubClassOf("RegisterClass"))
       throw "Unknown operand class '" + Rec->getName() +
             "' in instruction '" + R->getName() + "' instruction!";
 
@@ -302,9 +298,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
       throw "In instruction '" + R->getName() + "', operand #" + utostr(i) +
         " has the same name as a previous operand!";
     
-    OperandList.push_back(OperandInfo(Rec, Ty, DI->getArgName(i),
-                                      PrintMethod, MIOperandNo, NumOps,
-                                      MIOpInfo));
+    OperandList.push_back(OperandInfo(Rec, DI->getArgName(i), PrintMethod, 
+                                      MIOperandNo, NumOps, MIOpInfo));
     MIOperandNo += NumOps;
   }
 }