Avoid being influenced by dbg_value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2010-03-25 01:01:37 +00:00
parent 1f2ae40efd
commit 48f2cb926e
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
E = ImpDefs.end(); I != E; ++I) {
MachineInstr *DefMI = *I;
unsigned DefReg = DefMI->getOperand(0).getReg();
if (MRI->use_empty(DefReg))
if (MRI->use_nodbg_empty(DefReg))
DefMI->eraseFromParent();
}

View File

@ -2800,7 +2800,7 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
if (MO.isDead())
continue;
if (TargetRegisterInfo::isPhysicalRegister(Reg) ||
!mri_->use_empty(Reg)) {
!mri_->use_nodbg_empty(Reg)) {
isDead = false;
break;
}