mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 16:48:02 +00:00
do not (implicitly) dereference iterator many times, cache it instead
llvm-svn: 109222
This commit is contained in:
parent
ea5f4cc47c
commit
a04ffe0391
@ -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…
x
Reference in New Issue
Block a user