We don't need to insert copies for implicit_def's.

llvm-svn: 56674
This commit is contained in:
Owen Anderson 2008-09-26 18:50:46 +00:00
parent 9627d6720a
commit a381313d98
1 changed files with 5 additions and 1 deletions

View File

@ -420,7 +420,6 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) { while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {
unsigned DestReg = P->getOperand(0).getReg(); unsigned DestReg = P->getOperand(0).getReg();
// Don't both doing PHI elimination for dead PHI's. // Don't both doing PHI elimination for dead PHI's.
if (P->registerDefIsDead(DestReg)) { if (P->registerDefIsDead(DestReg)) {
++P; ++P;
@ -449,6 +448,11 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
continue; continue;
} }
// We don't need to insert copies for implicit_defs.
MachineInstr* DefMI = MRI.getVRegDef(SrcReg);
if (DefMI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF)
ProcessedNames.insert(SrcReg);
// Check for trivial interferences via liveness information, allowing us // Check for trivial interferences via liveness information, allowing us
// to avoid extra work later. Any registers that interfere cannot both // to avoid extra work later. Any registers that interfere cannot both
// be in the renaming set, so choose one and add copies for it instead. // be in the renaming set, so choose one and add copies for it instead.