[llvm] r177317 - TableGen fix for the new machine model.
Andrew Trick
atrick at apple.com
Mon Mar 18 13:42:25 PDT 2013
Author: atrick
Date: Mon Mar 18 15:42:25 2013
New Revision: 177317
URL: http://llvm.org/viewvc/llvm-project?rev=177317&view=rev
Log:
TableGen fix for the new machine model.
Properly handle cases where a group of instructions have different
SchedRW lists with the same itinerary class.
This was supposed to work, but I left in an early break.
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=177317&r1=177316&r2=177317&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Mon Mar 18 15:42:25 2013
@@ -779,14 +779,16 @@ void CodeGenSchedModels::collectProcItin
for (unsigned i = 0, N = ItinRecords.size(); i < N; i++) {
Record *ItinData = ItinRecords[i];
Record *ItinDef = ItinData->getValueAsDef("TheClass");
- SchedClassIter SCI = schedClassBegin(), SCE = schedClassEnd();
- for( ; SCI != SCE; ++SCI) {
+ bool FoundClass = false;
+ for (SchedClassIter SCI = schedClassBegin(), SCE = schedClassEnd();
+ SCI != SCE; ++SCI) {
+ // Multiple SchedClasses may share an itinerary. Update all of them.
if (SCI->ItinClassDef == ItinDef) {
ProcModel.ItinDefList[SCI->Index] = ItinData;
- break;
+ FoundClass = true;
}
}
- if (SCI == SCE) {
+ if (!FoundClass) {
DEBUG(dbgs() << ProcModel.ItinsDef->getName()
<< " missing class for itinerary " << ItinDef->getName() << '\n');
}
More information about the llvm-commits
mailing list