mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
Avoid iterating every operand of an instruction in StrongPHIElimination, since
we are only interested in the defs when discovering interferences. This is a 28% speedup running StrongPHIElimination on 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2aea490e16
commit
92f0fcb6df
@ -471,10 +471,9 @@ StrongPHIElimination::SplitInterferencesForBasicBlock(
|
||||
DenseMap<unsigned, unsigned>& ImmediateDominatingParent) {
|
||||
for (MachineBasicBlock::iterator BBI = MBB.begin(), BBE = MBB.end();
|
||||
BBI != BBE; ++BBI) {
|
||||
for (unsigned i = 0, e = BBI->getNumOperands(); i != e; ++i) {
|
||||
MachineOperand& MO = BBI->getOperand(i);
|
||||
if (!MO.isReg() || !MO.isDef())
|
||||
continue;
|
||||
for (MachineInstr::const_mop_iterator I = BBI->operands_begin(),
|
||||
E = BBI->operands_end(); I != E && I->isReg() && I->isDef(); ++I) {
|
||||
const MachineOperand& MO = *I;
|
||||
|
||||
unsigned DestReg = MO.getReg();
|
||||
if (!DestReg || !TargetRegisterInfo::isVirtualRegister(DestReg))
|
||||
|
Loading…
Reference in New Issue
Block a user