mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 20:15:35 +00:00
MBB::remove should not modify the iterator passed in
llvm-svn: 12572
This commit is contained in:
parent
2cc4a29665
commit
bfe4dd0f90
@ -648,7 +648,8 @@ RecordSchedule(MachineBasicBlock &MBB, const SchedulingManager& S)
|
||||
|
||||
// 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)
|
||||
|
@ -542,7 +542,7 @@ void PhyRegAlloc::updateMachineCode()
|
||||
}
|
||||
|
||||
// move instruction before branch
|
||||
MBB.insert(MII, MBB.remove(DelaySlotMI));
|
||||
MBB.insert(MII, MBB.remove(DelaySlotMI++));
|
||||
|
||||
// On cond1 we are done (we already moved the
|
||||
// instruction out of the delay slot). On cond2 we need
|
||||
|
Loading…
Reference in New Issue
Block a user