diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 7accaf5789f..8de27950ee1 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -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 diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 9a5dd2bda71..ca8d30f0c05 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -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();