@@ -890,6 +890,9 @@ void InstrInfoEmitter::emitTIIHelperMethods(raw_ostream &OS,
890890
891891// run - Emit the main instruction description records for the target...
892892void InstrInfoEmitter::run (raw_ostream &OS) {
893+ TGTimer &Timer = Records.getTimer ();
894+ Timer.startTimer (" Analyze DAG patterns" );
895+
893896 emitSourceFileHeader (" Target Instruction Enum Values and Descriptors" , OS);
894897 emitEnums (OS);
895898
@@ -898,7 +901,6 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
898901 const Record *InstrInfo = Target.getInstructionSet ();
899902
900903 // Collect all of the operand info records.
901- TGTimer &Timer = Records.getTimer ();
902904 Timer.startTimer (" Collect operand info" );
903905 OperandInfoListTy OperandInfoList;
904906 OperandInfoMapTy OperandInfoMap;
@@ -1138,6 +1140,9 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
11381140
11391141 Timer.startTimer (" Emit verifier methods" );
11401142 emitFeatureVerifier (OS, Target);
1143+
1144+ Timer.startTimer (" Emit map table" );
1145+ EmitMapTable (Records, OS);
11411146}
11421147
11431148void InstrInfoEmitter::emitRecord (
@@ -1314,13 +1319,5 @@ void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
13141319 OS << " #endif // GET_INSTRINFO_SCHED_ENUM\n\n " ;
13151320}
13161321
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