mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 02:22:29 +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:
@@ -171,8 +171,9 @@ void PIC16Overlay::MarkIndirectlyCalledFunctions(Module &M) {
|
|||||||
for (Module::iterator MI = M.begin(), E = M.end(); MI != E; ++MI) {
|
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;
|
for (Value::use_iterator I = MI->use_begin(), E = MI->use_end(); I != E;
|
||||||
++I) {
|
++I) {
|
||||||
if ((!isa<CallInst>(I) && !isa<InvokeInst>(I))
|
User *U = *I;
|
||||||
|| !CallSite(cast<Instruction>(I)).isCallee(I)) {
|
if ((!isa<CallInst>(U) && !isa<InvokeInst>(U))
|
||||||
|
|| !CallSite(cast<Instruction>(U)).isCallee(I)) {
|
||||||
setColor(MI, ++IndirectCallColor);
|
setColor(MI, ++IndirectCallColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user