[llvm] r284452 - Improve tablegen gen-subtarget diagnostics for missing machine models.
Andrew Trick via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 21:17:44 PDT 2016
Author: atrick
Date: Mon Oct 17 23:17:44 2016
New Revision: 284452
URL: http://llvm.org/viewvc/llvm-project?rev=284452&view=rev
Log:
Improve tablegen gen-subtarget diagnostics for missing machine models.
-debug-only=subtarget-emitter prints a lot of machine model diagnostics.
This prunes the output so that the "No machine model for XXX on processor YYY"
only appears when there is definitely no machine model for that opcode.
Previously it was printing that error even if the opcode was covered by
a more general scheduling class.
<rdar://problem/15919845> [TableGen][CodeGenSchedule] Debug output does not help spotting the missing scheduling classes
Modified:
llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=284452&r1=284451&r2=284452&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Mon Oct 17 23:17:44 2016
@@ -573,11 +573,14 @@ void CodeGenSchedModels::collectSchedCla
dbgs() << " " << SchedReads[*RI].Name;
dbgs() << '\n';
}
- for (std::vector<CodeGenProcModel>::iterator PI = ProcModels.begin(),
- PE = ProcModels.end(); PI != PE; ++PI) {
- if (!std::count(ProcIndices.begin(), ProcIndices.end(), PI->Index))
- dbgs() << "No machine model for " << Inst->TheDef->getName()
- << " on processor " << PI->ModelName << '\n';
+ // If ProcIndices contains zero, the class applies to all processors.
+ if (!std::count(ProcIndices.begin(), ProcIndices.end(), 0)) {
+ for (std::vector<CodeGenProcModel>::iterator PI = ProcModels.begin(),
+ PE = ProcModels.end(); PI != PE; ++PI) {
+ if (!std::count(ProcIndices.begin(), ProcIndices.end(), PI->Index))
+ dbgs() << "No machine model for " << Inst->TheDef->getName()
+ << " on processor " << PI->ModelName << '\n';
+ }
}
}
}
More information about the llvm-commits
mailing list