diff options
author | Lang Hames <lhames@gmail.com> | 2012-02-19 06:13:56 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2012-02-19 06:13:56 +0000 |
commit | 8140e8475775ccdaae88cb7a676542f6a9ac36f7 (patch) | |
tree | 9283e1771091928b96e0e69fb202991a5c2923bb /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 65a4ceea1e8686f657eaa4723bfb3a7c8abc5db4 (diff) | |
download | bcm5719-llvm-8140e8475775ccdaae88cb7a676542f6a9ac36f7.tar.gz bcm5719-llvm-8140e8475775ccdaae88cb7a676542f6a9ac36f7.zip |
Simplify moveEnteringDownFrom rules.
llvm-svn: 150914
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 6c5dd0e6119..66c65b4a316 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(); } } |