mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 14:46:53 +00:00
do not (implicitly) dereference iterator many times, cache it instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6252f6ea11
commit
9843688f97
@ -171,8 +171,9 @@ void PIC16Overlay::MarkIndirectlyCalledFunctions(Module &M) {
|
||||
for (Module::iterator MI = M.begin(), E = M.end(); MI != E; ++MI) {
|
||||
for (Value::use_iterator I = MI->use_begin(), E = MI->use_end(); I != E;
|
||||
++I) {
|
||||
if ((!isa<CallInst>(I) && !isa<InvokeInst>(I))
|
||||
|| !CallSite(cast<Instruction>(I)).isCallee(I)) {
|
||||
User *U = *I;
|
||||
if ((!isa<CallInst>(U) && !isa<InvokeInst>(U))
|
||||
|| !CallSite(cast<Instruction>(U)).isCallee(I)) {
|
||||
setColor(MI, ++IndirectCallColor);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user