Unbreak VC++ build.
[oota-llvm.git] / utils / TableGen / CodeGenInstruction.h
index 669280c1bbc8eb007bffb7dc18c2570bd7479a87..e1c4c7d6d310762cf604fb722681f490ac6a9669 100644 (file)
 
 namespace llvm {
   class Record;
+  class DagInit;
 
-  struct CodeGenInstruction {
+  class CodeGenInstruction {
+  public:
     Record *TheDef;            // The actual record defining this instruction.
     std::string Name;          // Contents of the 'Name' field.
     std::string Namespace;     // The namespace the instruction is in.
@@ -38,10 +40,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;
@@ -59,16 +57,28 @@ namespace llvm {
       unsigned MIOperandNo;
       unsigned MINumOperands;   // The number of operands.
 
-      OperandInfo(Record *R, MVT::ValueType T, const std::string &N,
-                  const std::string &PMN, unsigned MION, unsigned MINO)
-        : Rec(R), Ty(T), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
-          MINumOperands(MINO) {}
+      /// MIOperandInfo - Default MI operand type. Note an operand may be made
+      /// up of multiple MI operands.
+      DagInit *MIOperandInfo;
+
+      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) {}
     };
 
     /// OperandList - The list of declared operands, along with their declared
     /// type (which is a record).
     std::vector<OperandInfo> OperandList;
 
+    /// ConstraintStr - The operand constraints string.
+    ///
+    std::string ConstraintStr;
+
+    /// ConstraintsList - List of constraints, encoded into one unsigned int per
+    /// operand.
+    std::vector<unsigned> ConstraintsList;
+
     // Various boolean values we track for the instruction.
     bool isReturn;
     bool isBranch;
@@ -81,8 +91,10 @@ namespace llvm {
     bool isCommutable;
     bool isTerminator;
     bool hasDelaySlot;
-    bool usesCustomDAGSChedInserter;
+    bool usesCustomDAGSchedInserter;
     bool hasVariableNumberOfOperands;
+    bool hasCtrlDep;
+    bool noResults;
 
     CodeGenInstruction(Record *R, const std::string &AsmStr);