mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
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:
parent
0d397bd437
commit
2daec45751
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user