Fix regression introduced by r83894.

llvm-svn: 83982
This commit is contained in:
Bob Wilson 2009-10-13 17:29:13 +00:00
parent ad47e7ea81
commit d26a26ae7e
1 changed files with 2 additions and 1 deletions

View File

@ -933,13 +933,14 @@ static inline unsigned getUnconditionalBrDisp(int Opc) {
///
MachineBasicBlock *ARMConstantIslands::AcceptWater(water_iterator IP) {
DEBUG(errs() << "found water in range\n");
MachineBasicBlock *WaterBB = *IP;
// Remove the original WaterList entry; we want subsequent
// insertions in this vicinity to go after the one we're
// about to insert. This considerably reduces the number
// of times we have to move the same CPE more than once.
WaterList.erase(IP);
// CPE goes before following block (NewMBB).
return next(MachineFunction::iterator(*IP));
return next(MachineFunction::iterator(WaterBB));
}
/// LookForWater - look for an existing entry in the WaterList in which