mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Fix one more case of splitting after the last split point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a50c539b7a
commit
8a2bbdeee2
@ -746,8 +746,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IP.second.getBoundaryIndex() < BI.LastUse &&
|
if (IP.second.getBoundaryIndex() < BI.LastUse) {
|
||||||
IP.second.getBoundaryIndex() <= BI.LastSplitPoint) {
|
|
||||||
// There are interference-free uses at the end of the block.
|
// There are interference-free uses at the end of the block.
|
||||||
// Find the first use that can get the live-out register.
|
// Find the first use that can get the live-out register.
|
||||||
SmallVectorImpl<SlotIndex>::const_iterator UI =
|
SmallVectorImpl<SlotIndex>::const_iterator UI =
|
||||||
@ -755,13 +754,16 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, unsigned PhysReg,
|
|||||||
IP.second.getBoundaryIndex());
|
IP.second.getBoundaryIndex());
|
||||||
assert(UI != SA->UseSlots.end() && "Couldn't find last use");
|
assert(UI != SA->UseSlots.end() && "Couldn't find last use");
|
||||||
SlotIndex Use = *UI;
|
SlotIndex Use = *UI;
|
||||||
DEBUG(dbgs() << ", free use at " << Use << ".\n");
|
|
||||||
assert(Use <= BI.LastUse && "Couldn't find last use");
|
assert(Use <= BI.LastUse && "Couldn't find last use");
|
||||||
SlotIndex SegStart = SE.enterIntvBefore(Use);
|
// Only attempt a split befroe the last split point.
|
||||||
assert(SegStart >= IP.second && "Couldn't avoid interference");
|
if (Use.getBaseIndex() <= BI.LastSplitPoint) {
|
||||||
assert(SegStart < BI.LastSplitPoint && "Impossible split point");
|
DEBUG(dbgs() << ", free use at " << Use << ".\n");
|
||||||
SE.useIntv(SegStart, Stop);
|
SlotIndex SegStart = SE.enterIntvBefore(Use);
|
||||||
continue;
|
assert(SegStart >= IP.second && "Couldn't avoid interference");
|
||||||
|
assert(SegStart < BI.LastSplitPoint && "Impossible split point");
|
||||||
|
SE.useIntv(SegStart, Stop);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interference is after the last use.
|
// Interference is after the last use.
|
||||||
|
Loading…
Reference in New Issue
Block a user