mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
LiveIntervalAnalysis: Mark subregister defs as undef when we determined they are only reading a dead superregister value
This was not necessary before as this case can only be detected when the liveness analysis is at subregister level. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1889,6 +1889,14 @@ bool MachineInstr::addRegisterDead(unsigned Reg,
|
||||
return true;
|
||||
}
|
||||
|
||||
void MachineInstr::addRegisterDefReadUndef(unsigned Reg) {
|
||||
for (MachineOperand &MO : operands()) {
|
||||
if (!MO.isReg() || !MO.isDef() || MO.getReg() != Reg || MO.getSubReg() == 0)
|
||||
continue;
|
||||
MO.setIsUndef();
|
||||
}
|
||||
}
|
||||
|
||||
void MachineInstr::addRegisterDefined(unsigned Reg,
|
||||
const TargetRegisterInfo *RegInfo) {
|
||||
if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||
|
Reference in New Issue
Block a user