[llvm-commits] CVS: llvm/utils/TableGen/CodeGenInstruction.h CodeGenTarget.cpp

Nate Begeman natebegeman at mac.com
Wed Nov 30 16:12:16 PST 2005



Changes in directory llvm/utils/TableGen:

CodeGenInstruction.h updated: 1.14 -> 1.15
CodeGenTarget.cpp updated: 1.44 -> 1.45
---
Log message:

Nuke CodeGenInstruction's ValueType member, it is no longer used.


---
Diffs of the changes:  (+7 -18)

 CodeGenInstruction.h |   12 +++---------
 CodeGenTarget.cpp    |   13 ++++---------
 2 files changed, 7 insertions(+), 18 deletions(-)


Index: llvm/utils/TableGen/CodeGenInstruction.h
diff -u llvm/utils/TableGen/CodeGenInstruction.h:1.14 llvm/utils/TableGen/CodeGenInstruction.h:1.15
--- llvm/utils/TableGen/CodeGenInstruction.h:1.14	Wed Nov 30 17:58:18 2005
+++ llvm/utils/TableGen/CodeGenInstruction.h	Wed Nov 30 18:12:04 2005
@@ -39,10 +39,6 @@
       ///
       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 @@
       /// 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: llvm/utils/TableGen/CodeGenTarget.cpp
diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.44 llvm/utils/TableGen/CodeGenTarget.cpp:1.45
--- llvm/utils/TableGen/CodeGenTarget.cpp:1.44	Tue Nov 29 00:19:38 2005
+++ llvm/utils/TableGen/CodeGenTarget.cpp	Wed Nov 30 18:12:04 2005
@@ -276,21 +276,17 @@
       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 @@
       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;
   }
 }






More information about the llvm-commits mailing list