File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1399,9 +1399,8 @@ void InstructionOpcodeMatcher::initOpcodeValuesMap(
1399
1399
const CodeGenTarget &Target) {
1400
1400
OpcodeValues.clear ();
1401
1401
1402
- unsigned OpcodeValue = 0 ;
1403
1402
for (const CodeGenInstruction *I : Target.getInstructionsByEnumValue ())
1404
- OpcodeValues[I] = OpcodeValue++ ;
1403
+ OpcodeValues[I] = Target. getInstrIntValue (I-> TheDef ) ;
1405
1404
}
1406
1405
1407
1406
MatchTableRecord InstructionOpcodeMatcher::getValue () const {
Original file line number Diff line number Diff line change @@ -1284,8 +1284,9 @@ void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
1284
1284
OS << " enum {\n " ;
1285
1285
unsigned Num = 0 ;
1286
1286
for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue ())
1287
- OS << " " << Inst->TheDef ->getName () << " \t = " << Num++ << " ,\n " ;
1288
- OS << " INSTRUCTION_LIST_END = " << Num << " \n " ;
1287
+ OS << " " << Inst->TheDef ->getName ()
1288
+ << " \t = " << (Num = Target.getInstrIntValue (Inst->TheDef )) << " ,\n " ;
1289
+ OS << " INSTRUCTION_LIST_END = " << Num + 1 << " \n " ;
1289
1290
OS << " };\n\n " ;
1290
1291
OS << " } // end namespace " << Namespace << " \n " ;
1291
1292
OS << " } // end namespace llvm\n " ;
You can’t perform that action at this time.
0 commit comments