[PATCH] D118628: [TableGen] Fix reporting from CodeGenSchedModels::checkCompleteness()

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 10:01:33 PST 2022


jonpa created this revision.
jonpa added reviewers: RKSimon, uweigand.
jonpa requested review of this revision.
Herald added a project: LLVM.

Make the check for a complete SchedModel:s work as expected: report any supported instruction not having scheduler info in a complete SchedModel.

For unclear reasons there was a variable 'HadComleteModel' that caused e.g. new instructions for a new subtarget not to be reported. This variable is now simply removed as all in-tree targets build fine without it.


https://reviews.llvm.org/D118628

Files:
  llvm/utils/TableGen/CodeGenSchedule.cpp


Index: llvm/utils/TableGen/CodeGenSchedule.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenSchedule.cpp
+++ llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -1973,7 +1973,6 @@
 
 void CodeGenSchedModels::checkCompleteness() {
   bool Complete = true;
-  bool HadCompleteModel = false;
   for (const CodeGenProcModel &ProcModel : procModels()) {
     const bool HasItineraries = ProcModel.hasItineraries();
     if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
@@ -1985,7 +1984,7 @@
         continue;
       unsigned SCIdx = getSchedClassIdx(*Inst);
       if (!SCIdx) {
-        if (Inst->TheDef->isValueUnset("SchedRW") && !HadCompleteModel) {
+        if (Inst->TheDef->isValueUnset("SchedRW")) {
           PrintError(Inst->TheDef->getLoc(),
                      "No schedule information for instruction '" +
                          Inst->TheDef->getName() + "' in SchedMachineModel '" +
@@ -2013,7 +2012,6 @@
         Complete = false;
       }
     }
-    HadCompleteModel = true;
   }
   if (!Complete) {
     errs() << "\n\nIncomplete schedule models found.\n"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118628.404584.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/d676b730/attachment.bin>


More information about the llvm-commits mailing list