diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 22:10:00 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 22:10:00 +0000 |
commit | c5b6135fb55362f5c052625043ebf3286f799f86 (patch) | |
tree | c3fad459126250734fb11e96a39a3462a3cad524 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 0e827ebc783ded58c11aeb0d66bed43e214de2de (diff) | |
download | llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.gz llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.bz2 llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.xz |
Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index e07922b54c..a716e8bbab 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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(); |