Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically. llvm-svn: 175673
This commit is contained in:
@@ -1038,6 +1038,13 @@ LiveIntervals::repairIntervalsInRange(MachineBasicBlock *MBB,
|
||||
MachineBasicBlock::iterator Begin,
|
||||
MachineBasicBlock::iterator End,
|
||||
ArrayRef<unsigned> OrigRegs) {
|
||||
// Find anchor points, which are at the beginning/end of blocks or at
|
||||
// instructions that already have indexes.
|
||||
while (Begin != MBB->begin() && !Indexes->hasIndex(Begin))
|
||||
--Begin;
|
||||
while (End != MBB->end() && !Indexes->hasIndex(End))
|
||||
++End;
|
||||
|
||||
SlotIndex endIdx;
|
||||
if (End == MBB->end())
|
||||
endIdx = getMBBEndIdx(MBB).getPrevSlot();
|
||||
|
||||
Reference in New Issue
Block a user