Added TargetInstrDescriptor::numDefs - num of results.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 2 Aug 2007 00:20:17 +0000 (00:20 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 2 Aug 2007 00:20:17 +0000 (00:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40709 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h
utils/TableGen/InstrInfoEmitter.cpp

index 7accaf5789f9b99e18e923936cddc644e8a5f51b..8de27950ee1df99864b47ebec9efc0da6ad0eee5 100644 (file)
@@ -130,6 +130,7 @@ class TargetInstrDescriptor {
 public:
   MachineOpCode   Opcode;        // The opcode.
   unsigned short  numOperands;   // Num of args (may be more if variable_ops).
+  unsigned short  numDefs;       // Num of args that are definitions.
   const char *    Name;          // Assembly language mnemonic for the opcode.
   InstrSchedClass schedClass;    // enum  identifying instr sched class
   unsigned        Flags;         // flags identifying machine instr class
index 9a5dd2bda71d2735b81e2e852365399d66f58900..ca8d30f0c05ab489f97e7d752c8cbedc569a7197 100644 (file)
@@ -203,7 +203,8 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
     MinOperands = 0;
   
   OS << "  { ";
-  OS << Num << ",\t" << MinOperands << ",\t\"";
+  OS << Num << ",\t" << MinOperands << ",\t"
+     << Inst.NumDefs << ",\t\"";
 
   if (Inst.Name.empty())
     OS << Inst.TheDef->getName();