mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
misched: fix LiveInterval update for bottom-up scheduling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aad37f1925
commit
f70af52a8f
@ -1049,9 +1049,19 @@ public:
|
|||||||
bool hasRegMaskOp = false;
|
bool hasRegMaskOp = false;
|
||||||
collectRanges(MI, Entering, Internal, Exiting, hasRegMaskOp, OldIdx);
|
collectRanges(MI, Entering, Internal, Exiting, hasRegMaskOp, OldIdx);
|
||||||
|
|
||||||
|
// To keep the LiveRanges valid within an interval, move the ranges closest
|
||||||
|
// to the destination first. This prevents ranges from overlapping, to that
|
||||||
|
// APIs like removeRange still work.
|
||||||
|
if (NewIdx < OldIdx) {
|
||||||
moveAllEnteringFrom(OldIdx, Entering);
|
moveAllEnteringFrom(OldIdx, Entering);
|
||||||
moveAllInternalFrom(OldIdx, Internal);
|
moveAllInternalFrom(OldIdx, Internal);
|
||||||
moveAllExitingFrom(OldIdx, Exiting);
|
moveAllExitingFrom(OldIdx, Exiting);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
moveAllExitingFrom(OldIdx, Exiting);
|
||||||
|
moveAllInternalFrom(OldIdx, Internal);
|
||||||
|
moveAllEnteringFrom(OldIdx, Entering);
|
||||||
|
}
|
||||||
|
|
||||||
if (hasRegMaskOp)
|
if (hasRegMaskOp)
|
||||||
updateRegMaskSlots(OldIdx);
|
updateRegMaskSlots(OldIdx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user