diff options
| author | Andrew Trick <atrick@apple.com> | 2013-03-18 20:42:25 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2013-03-18 20:42:25 +0000 |
| commit | e7bac5f5477d1af63bee9b27692ba5e2166d8736 (patch) | |
| tree | dfe1ec7521cb2ac06ff4ee0ee133d9f24652a33f /llvm | |
| parent | 99067af7914b329b93b6b099c267c2c012bdf55e (diff) | |
| download | bcm5719-llvm-e7bac5f5477d1af63bee9b27692ba5e2166d8736.tar.gz bcm5719-llvm-e7bac5f5477d1af63bee9b27692ba5e2166d8736.zip | |
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.
llvm-svn: 177317
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenSchedule.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp index e3a6fe1bf13..227019d97a2 100644 --- a/llvm/utils/TableGen/CodeGenSchedule.cpp +++ b/llvm/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'); } |

