mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Ensure that def-side physreg copies are scheduled above any other uses
so the scheduler can't create new interferences on the copies themselves. Prior to this fix the scheduler could get stuck in a loop creating copies. Fixes PR9509. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d93a110e3
commit
bd47a4a307
@ -935,6 +935,15 @@ void ScheduleDAGRRList::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
|
||||
AddPred(SuccSU, D);
|
||||
DelDeps.push_back(std::make_pair(SuccSU, *I));
|
||||
}
|
||||
else {
|
||||
// Avoid scheduling the def-side copy before other successors. Otherwise
|
||||
// we could introduce another physreg interference on the copy and
|
||||
// continue inserting copies indefinitely.
|
||||
SDep D(CopyFromSU, SDep::Order, /*Latency=*/0,
|
||||
/*Reg=*/0, /*isNormalMemory=*/false,
|
||||
/*isMustAlias=*/false, /*isArtificial=*/true);
|
||||
AddPred(SuccSU, D);
|
||||
}
|
||||
}
|
||||
for (unsigned i = 0, e = DelDeps.size(); i != e; ++i)
|
||||
RemovePred(DelDeps[i].first, DelDeps[i].second);
|
||||
|
Loading…
Reference in New Issue
Block a user