[llvm-commits] [llvm] r150914 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Lang Hames
lhames at gmail.com
Sat Feb 18 22:13:57 PST 2012
Author: lhames
Date: Sun Feb 19 00:13:56 2012
New Revision: 150914
URL: http://llvm.org/viewvc/llvm-project?rev=150914&view=rev
Log:
Simplify moveEnteringDownFrom rules.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=150914&r1=150913&r2=150914&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Feb 19 00:13:56 2012
@@ -1205,17 +1205,9 @@
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();
}
}
More information about the llvm-commits
mailing list