Simplify moveEnteringDownFrom rules.

llvm-svn: 150914
This commit is contained in:
Lang Hames 2012-02-19 06:13:56 +00:00
parent 65a4ceea1e
commit 8140e84757
1 changed files with 3 additions and 11 deletions

View File

@ -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();
}
}