mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
LiveIntervalAnalysis: Factor out code to update liveness on physreg def removal
This cleans up code and is more in line with the general philosophy of modifying LiveIntervals through LiveIntervalAnalysis instead of changing them directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -256,15 +256,8 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
|
||||
// Check if MI reads any unreserved physregs.
|
||||
if (Reg && MOI->readsReg() && !MRI.isReserved(Reg))
|
||||
ReadsPhysRegs = true;
|
||||
else if (MOI->isDef()) {
|
||||
for (MCRegUnitIterator Units(Reg, MRI.getTargetRegisterInfo());
|
||||
Units.isValid(); ++Units) {
|
||||
if (LiveRange *LR = LIS.getCachedRegUnit(*Units)) {
|
||||
if (VNInfo *VNI = LR->getVNInfoAt(Idx))
|
||||
LR->removeValNo(VNI);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (MOI->isDef())
|
||||
LIS.removePhysRegDefAt(Reg, Idx);
|
||||
continue;
|
||||
}
|
||||
LiveInterval &LI = LIS.getInterval(Reg);
|
||||
|
Reference in New Issue
Block a user