// Remove all except the dummy PHI instructions from MBB, and
// pre-allocate create space for the ones we will put back in.
- while (I != MBB.end()) MBB.remove(I);
+ while (I != MBB.end())
+ MBB.remove(I++);
InstrSchedule::const_iterator NIend = S.isched.end();
for (InstrSchedule::const_iterator NI = S.isched.begin(); NI != NIend; ++NI)