aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-09-09 13:44:24 +0000
committerDuncan Sands <baldrick@free.fr>2008-09-09 13:44:24 +0000
commit24a052124bca3a518c9b30fbc57fa54f76bfbc46 (patch)
tree7844ab4bbf222b089a734dbf0585d4522571f8e4 /lib/Analysis/IPA/CallGraph.cpp
parent99c1a7c9e1f501878040f3adcac342b2d8201709 (diff)
Optimization suggested by Matthijs Kooijman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index d24373c9b5..1a65179c5a 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -135,7 +135,8 @@ private:
I != E && !isUsedExternally; ++I) {
if (Instruction *Inst = dyn_cast<Instruction>(*I)) {
CallSite CS = CallSite::get(Inst);
- isUsedExternally = !CS.getInstruction() || CS.hasArgument(F);
+ // Not a call? Or F being passed as a parameter not as the callee?
+ isUsedExternally = !CS.getInstruction() || I.getOperandNo();
} else { // User is not a direct call!
isUsedExternally = true;
}