mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
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
This commit is contained in:
@ -779,14 +779,16 @@ void CodeGenSchedModels::collectProcItins() {
|
|||||||
for (unsigned i = 0, N = ItinRecords.size(); i < N; i++) {
|
for (unsigned i = 0, N = ItinRecords.size(); i < N; i++) {
|
||||||
Record *ItinData = ItinRecords[i];
|
Record *ItinData = ItinRecords[i];
|
||||||
Record *ItinDef = ItinData->getValueAsDef("TheClass");
|
Record *ItinDef = ItinData->getValueAsDef("TheClass");
|
||||||
SchedClassIter SCI = schedClassBegin(), SCE = schedClassEnd();
|
bool FoundClass = false;
|
||||||
for( ; SCI != SCE; ++SCI) {
|
for (SchedClassIter SCI = schedClassBegin(), SCE = schedClassEnd();
|
||||||
|
SCI != SCE; ++SCI) {
|
||||||
|
// Multiple SchedClasses may share an itinerary. Update all of them.
|
||||||
if (SCI->ItinClassDef == ItinDef) {
|
if (SCI->ItinClassDef == ItinDef) {
|
||||||
ProcModel.ItinDefList[SCI->Index] = ItinData;
|
ProcModel.ItinDefList[SCI->Index] = ItinData;
|
||||||
break;
|
FoundClass = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SCI == SCE) {
|
if (!FoundClass) {
|
||||||
DEBUG(dbgs() << ProcModel.ItinsDef->getName()
|
DEBUG(dbgs() << ProcModel.ItinsDef->getName()
|
||||||
<< " missing class for itinerary " << ItinDef->getName() << '\n');
|
<< " missing class for itinerary " << ItinDef->getName() << '\n');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user