@@ -890,6 +890,9 @@ void InstrInfoEmitter::emitTIIHelperMethods(raw_ostream &OS,
890
890
891
891
// run - Emit the main instruction description records for the target...
892
892
void InstrInfoEmitter::run (raw_ostream &OS) {
893
+ TGTimer &Timer = Records.getTimer ();
894
+ Timer.startTimer (" Analyze DAG patterns" );
895
+
893
896
emitSourceFileHeader (" Target Instruction Enum Values and Descriptors" , OS);
894
897
emitEnums (OS);
895
898
@@ -898,7 +901,6 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
898
901
const Record *InstrInfo = Target.getInstructionSet ();
899
902
900
903
// Collect all of the operand info records.
901
- TGTimer &Timer = Records.getTimer ();
902
904
Timer.startTimer (" Collect operand info" );
903
905
OperandInfoListTy OperandInfoList;
904
906
OperandInfoMapTy OperandInfoMap;
@@ -1138,6 +1140,9 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
1138
1140
1139
1141
Timer.startTimer (" Emit verifier methods" );
1140
1142
emitFeatureVerifier (OS, Target);
1143
+
1144
+ Timer.startTimer (" Emit map table" );
1145
+ EmitMapTable (Records, OS);
1141
1146
}
1142
1147
1143
1148
void InstrInfoEmitter::emitRecord (
@@ -1314,13 +1319,5 @@ void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
1314
1319
OS << " #endif // GET_INSTRINFO_SCHED_ENUM\n\n " ;
1315
1320
}
1316
1321
1317
- static void EmitInstrInfo (const RecordKeeper &Records, raw_ostream &OS) {
1318
- TGTimer &Timer = Records.getTimer ();
1319
- Timer.startTimer (" Analyze DAG patterns" );
1320
- InstrInfoEmitter (Records).run (OS);
1321
- Timer.startTimer (" Emit map table" );
1322
- EmitMapTable (Records, OS);
1323
- }
1324
-
1325
- static TableGen::Emitter::Opt X (" gen-instr-info" , EmitInstrInfo,
1326
- " Generate instruction descriptions" );
1322
+ static TableGen::Emitter::OptClass<InstrInfoEmitter>
1323
+ X (" gen-instr-info" , " Generate instruction descriptions" );
0 commit comments