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
This commit is contained in:
Andrew Trick 2013-03-18 20:42:25 +00:00
parent 99067af791
commit e7bac5f547
1 changed files with 6 additions and 4 deletions

View File

@ -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');
}