diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 22:05:42 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 22:05:42 +0000 |
| commit | ce7cc08f3ac22aa6eb81b748926297c43774d170 (patch) | |
| tree | e02491fb503c5a0e3bf4a32d9766850f6caa62e2 /llvm/lib | |
| parent | 6cfa82bc5f0dae53f6cc39a0cbdba960119852cc (diff) | |
| download | bcm5719-llvm-ce7cc08f3ac22aa6eb81b748926297c43774d170.tar.gz bcm5719-llvm-ce7cc08f3ac22aa6eb81b748926297c43774d170.zip | |
Simplify early clobber slots a bit.
llvm-svn: 144507
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 954d9bbfaaf..1346487a668 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -197,11 +197,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, LiveVariables::VarInfo& vi = lv_->getVarInfo(interval.reg); if (interval.empty()) { // Get the Idx of the defining instructions. - SlotIndex defIndex = MIIdx.getRegSlot(); - // Earlyclobbers move back one, so that they overlap the live range - // of inputs. - if (MO.isEarlyClobber()) - defIndex = MIIdx.getRegSlot(true); + SlotIndex defIndex = MIIdx.getRegSlot(MO.isEarlyClobber()); // Make sure the first definition is not a partial redefinition. Add an // <imp-def> of the full register. @@ -323,9 +319,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, // are actually two values in the live interval. Because of this we // need to take the LiveRegion that defines this register and split it // into two values. - SlotIndex RedefIndex = MIIdx.getRegSlot(); - if (MO.isEarlyClobber()) - RedefIndex = MIIdx.getRegSlot(true); + SlotIndex RedefIndex = MIIdx.getRegSlot(MO.isEarlyClobber()); const LiveRange *OldLR = interval.getLiveRangeContaining(RedefIndex.getRegSlot(true)); @@ -402,10 +396,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock *MBB, DEBUG(dbgs() << "\t\tregister: " << PrintReg(interval.reg, tri_)); SlotIndex baseIndex = MIIdx; - SlotIndex start = baseIndex.getRegSlot(); - // Earlyclobbers move back one. - if (MO.isEarlyClobber()) - start = MIIdx.getRegSlot(true); + SlotIndex start = baseIndex.getRegSlot(MO.isEarlyClobber()); SlotIndex end = start; // If it is not used after definition, it is considered dead at |

