Commit Gabor Greif's patch to use iterators in lowering intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman 2005-03-24 20:07:16 +00:00
parent 0d397bd437
commit 2daec45751

View File

@ -1928,15 +1928,16 @@ void PPC32ISel::LowerUnknownIntrinsicFunctionCalls(Function &F) {
BB->getInstList().erase(CI);
break;
}
default:
default: {
// All other intrinsic calls we must lower.
Instruction *Before = CI->getPrev();
BasicBlock::iterator me(CI);
bool atBegin(BB->begin() == me);
if (!atBegin)
--me;
TM.getIntrinsicLowering().LowerIntrinsicCall(CI);
if (Before) { // Move iterator to instruction after call
I = Before; ++I;
} else {
I = BB->begin();
}
// Move iterator to instruction after call
I = atBegin ? BB->begin() : ++me;
}
}
}