forked from OSchip/llvm-project
LiveVariables should not clobber MachineOperand::IsDead, ::IsKill on reserved physical registers
Patch by Nick Johnson <Nicholas.Paul.Johnson@deshawresearch.com> Differential Revision: http://reviews.llvm.org/D14875 llvm-svn: 254012
This commit is contained in:
parent
130de7af7f
commit
147110da84
|
@ -522,11 +522,15 @@ void LiveVariables::runOnInstr(MachineInstr *MI,
|
|||
continue;
|
||||
unsigned MOReg = MO.getReg();
|
||||
if (MO.isUse()) {
|
||||
MO.setIsKill(false);
|
||||
if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
|
||||
MRI->isReserved(MOReg)))
|
||||
MO.setIsKill(false);
|
||||
if (MO.readsReg())
|
||||
UseRegs.push_back(MOReg);
|
||||
} else /*MO.isDef()*/ {
|
||||
MO.setIsDead(false);
|
||||
if (!(TargetRegisterInfo::isPhysicalRegister(MOReg) &&
|
||||
MRI->isReserved(MOReg)))
|
||||
MO.setIsDead(false);
|
||||
DefRegs.push_back(MOReg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue