aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-03-18 20:42:25 +0000
committerAndrew Trick <atrick@apple.com>2013-03-18 20:42:25 +0000
commit02fec34de127d23987352b90bf095ad3fac75fb9 (patch)
tree99fac2ff3314ba923e5955c0440ad429e90ec749 /utils
parente68f0b650e32c1993c5d4c92e04cb3d7b7588010 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenSchedule.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/TableGen/CodeGenSchedule.cpp b/utils/TableGen/CodeGenSchedule.cpp
index e3a6fe1bf1..227019d97a 100644
--- a/utils/TableGen/CodeGenSchedule.cpp
+++ b/utils/TableGen/CodeGenSchedule.cpp
@@ -779,14 +779,16 @@ void CodeGenSchedModels::collectProcItins() {
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');
}