From 8140e8475775ccdaae88cb7a676542f6a9ac36f7 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sun, 19 Feb 2012 06:13:56 +0000 Subject: [PATCH] Simplify moveEnteringDownFrom rules. llvm-svn: 150914 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 6c5dd0e61190..66c65b4a3162 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/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(); } }