Use getVRegDef() instead of def_iterator. This leads to fewer defs being added
with 2-address instructions, for about a 3.5% speedup of StrongPHIElimination on 403.gcc. llvm-svn: 122635
This commit is contained in:
parent
acc6b4e2fd
commit
2f6dc10ccc
|
@ -233,10 +233,9 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction& MF) {
|
||||||
addReg(SrcReg);
|
addReg(SrcReg);
|
||||||
unionRegs(DestReg, SrcReg);
|
unionRegs(DestReg, SrcReg);
|
||||||
|
|
||||||
for (MachineRegisterInfo::def_iterator DI = MRI->def_begin(SrcReg),
|
MachineInstr* DefMI = MRI->getVRegDef(SrcReg);
|
||||||
DE = MRI->def_end(); DI != DE; ++DI) {
|
if (DefMI)
|
||||||
PHISrcDefs[DI->getParent()].push_back(&*DI);
|
PHISrcDefs[DefMI->getParent()].push_back(DefMI);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue