[llvm] 16978d8 - [TableGen] Fix reporting from CodeGenSchedModels::checkCompleteness().
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 09:34:31 PST 2022
Author: Jonas Paulsson
Date: 2022-02-01T11:32:38-06:00
New Revision: 16978d853bb820a73ce36ac736130f061d0a3edc
URL: https://github.com/llvm/llvm-project/commit/16978d853bb820a73ce36ac736130f061d0a3edc
DIFF: https://github.com/llvm/llvm-project/commit/16978d853bb820a73ce36ac736130f061d0a3edc.diff
LOG: [TableGen] Fix reporting from CodeGenSchedModels::checkCompleteness().
Make the check for a complete SchedModel work as expected: report any
supported instruction not having scheduler info.
For unclear reasons there was a variable 'HadCompleteModel' 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 seem to build fine without it.
Review: Simon Pilgrim
Differential Revision: https://reviews.llvm.org/D118628
Added:
Modified:
llvm/utils/TableGen/CodeGenSchedule.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index 9548dca84f5fa..e47bda725a17a 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -1982,7 +1982,6 @@ void CodeGenSchedModels::collectProcResources() {
void CodeGenSchedModels::checkCompleteness() {
bool Complete = true;
- bool HadCompleteModel = false;
for (const CodeGenProcModel &ProcModel : procModels()) {
const bool HasItineraries = ProcModel.hasItineraries();
if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
@@ -1994,7 +1993,7 @@ void CodeGenSchedModels::checkCompleteness() {
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 '" +
@@ -2022,7 +2021,6 @@ void CodeGenSchedModels::checkCompleteness() {
Complete = false;
}
}
- HadCompleteModel = true;
}
if (!Complete) {
errs() << "\n\nIncomplete schedule models found.\n"
More information about the llvm-commits
mailing list