Skip to content

Commit 16978d8

Browse files
committed
[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
1 parent 0dc33c0 commit 16978d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/utils/TableGen/CodeGenSchedule.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,6 @@ void CodeGenSchedModels::collectProcResources() {
19821982

19831983
void CodeGenSchedModels::checkCompleteness() {
19841984
bool Complete = true;
1985-
bool HadCompleteModel = false;
19861985
for (const CodeGenProcModel &ProcModel : procModels()) {
19871986
const bool HasItineraries = ProcModel.hasItineraries();
19881987
if (!ProcModel.ModelDef->getValueAsBit("CompleteModel"))
@@ -1994,7 +1993,7 @@ void CodeGenSchedModels::checkCompleteness() {
19941993
continue;
19951994
unsigned SCIdx = getSchedClassIdx(*Inst);
19961995
if (!SCIdx) {
1997-
if (Inst->TheDef->isValueUnset("SchedRW") && !HadCompleteModel) {
1996+
if (Inst->TheDef->isValueUnset("SchedRW")) {
19981997
PrintError(Inst->TheDef->getLoc(),
19991998
"No schedule information for instruction '" +
20001999
Inst->TheDef->getName() + "' in SchedMachineModel '" +
@@ -2022,7 +2021,6 @@ void CodeGenSchedModels::checkCompleteness() {
20222021
Complete = false;
20232022
}
20242023
}
2025-
HadCompleteModel = true;
20262024
}
20272025
if (!Complete) {
20282026
errs() << "\n\nIncomplete schedule models found.\n"

0 commit comments

Comments
 (0)