Skip to content
Snippets Groups Projects
Commit 2f6dc10c authored by Cameron Zwarich's avatar Cameron Zwarich
Browse files

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
parent acc6b4e2
No related branches found
No related tags found
No related merge requests found
...@@ -233,10 +233,9 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction& MF) { ...@@ -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);
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment