// Iterate through each instruction in the function, looking for pseudos.
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) {
- MachineBasicBlock *MBB = I;
+ MachineBasicBlock *MBB = &*I;
for (MachineBasicBlock::iterator MBBI = MBB->begin(), MBBE = MBB->end();
MBBI != MBBE; ) {
MachineInstr *MI = MBBI++;
// The expansion may involve new basic blocks.
if (NewMBB != MBB) {
MBB = NewMBB;
- I = NewMBB;
+ I = NewMBB->getIterator();
MBBI = NewMBB->begin();
MBBE = NewMBB->end();
}