summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2016-10-18 04:17:44 +0000
committerAndrew Trick <atrick@apple.com>2016-10-18 04:17:44 +0000
commitf9df92c91569adbf640a69ba7a0d84344366bdeb (patch)
tree0e04398a2324219b9b2b5e67f97c4d738e17854f
parent7268bf99ab480b54bb52675d662c71fa521c0411 (diff)
downloadbcm5719-llvm-f9df92c91569adbf640a69ba7a0d84344366bdeb.tar.gz
bcm5719-llvm-f9df92c91569adbf640a69ba7a0d84344366bdeb.zip
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 llvm-svn: 284452
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index 22f48ad3d48..eb7899ea92c 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -573,11 +573,14 @@ void CodeGenSchedModels::collectSchedClasses() {
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';
+ }
}
}
}
OpenPOWER on IntegriCloud