summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-02-19 06:13:56 +0000
committerLang Hames <lhames@gmail.com>2012-02-19 06:13:56 +0000
commit4a0b2d658ae9e296598f8c8ac36c7fe571a7eec5 (patch)
treee430ea7f63c72d102b3cc756151548b49c353c84 /lib
parentdd637ae0c316334cd7b353c96ae270cc0d9095e4 (diff)
downloadllvm-4a0b2d658ae9e296598f8c8ac36c7fe571a7eec5.tar.gz
llvm-4a0b2d658ae9e296598f8c8ac36c7fe571a7eec5.tar.bz2
llvm-4a0b2d658ae9e296598f8c8ac36c7fe571a7eec5.tar.xz
Simplify moveEnteringDownFrom rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 6c5dd0e611..66c65b4a31 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1205,17 +1205,9 @@ private:
void moveEnteringDownFrom(SlotIndex OldIdx, IntRangePair& P) {
LiveInterval* LI = P.first;
LiveRange* LR = P.second;
- bool LiveThrough = LR->end > OldIdx.getRegSlot();
- if (LiveThrough) {
- MachineBasicBlock* MBB = LIS.getInstructionFromIndex(NewIdx)->getParent();
- bool LiveOut = LR->end >= LIS.getSlotIndexes()->getMBBEndIdx(MBB);
- if (!LiveOut) {
- moveKillFlags(LI->reg, LR->end, NewIdx);
- LR->end = NewIdx.getRegSlot(LR->end.isEarlyClobber());
- }
- } else {
- // Not live through. Easy - just update the range endpoint.
- LR->end = NewIdx.getRegSlot(LR->end.isEarlyClobber());
+ if (NewIdx > LR->end) {
+ moveKillFlags(LI->reg, LR->end, NewIdx);
+ LR->end = NewIdx.getRegSlot();
}
}