for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
if (PN->getIncomingValue(i) == IV) {
SplitCriticalEdge(PN->getIncomingBlock(i), PN->getParent(), P);
+ // Splitting the critical edge can reduce the number of entries in this
+ // PHI.
+ e = PN->getNumIncomingValues();
if (--NumUses == 0) break;
}
BasicBlock *NewBB = PN->getIncomingBlock(i);
NewBB->moveBefore(PN->getParent());
}
+
+ // Splitting the edge can reduce the number of PHI entries we have.
+ e = PN->getNumIncomingValues();
}
Value *&Code = InsertedCode[PN->getIncomingBlock(i)];