summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitd7ba10c31b33f930e1599f89854b9e1eb43e0004 (patch)
treedfd8ce34c95d6857de1f92e7bcf990e5efd8815e /llvm/lib/Analysis/IPA/CallGraph.cpp
parentc189e794409f7dcb0099a6692450f2c11818b74d (diff)
downloadbcm5719-llvm-d7ba10c31b33f930e1599f89854b9e1eb43e0004.tar.gz
bcm5719-llvm-d7ba10c31b33f930e1599f89854b9e1eb43e0004.zip
Optimization suggested by Matthijs Kooijman.
llvm-svn: 55988
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index d24373c9b55..1a65179c5aa 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud