aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-16 15:33:14 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-16 15:33:14 +0000
commit4ec2258ffb495d7ce00177e447740ef1123a27db (patch)
tree491894533b2bbca44875d321e209e1dc2e27abb3 /lib/Analysis/IPA/GlobalsModRef.cpp
parent52d55bd224ac08dfef959527ca8257f82a80dbb0 (diff)
downloadexternal_llvm-4ec2258ffb495d7ce00177e447740ef1123a27db.zip
external_llvm-4ec2258ffb495d7ce00177e447740ef1123a27db.tar.gz
external_llvm-4ec2258ffb495d7ce00177e447740ef1123a27db.tar.bz2
reapply r101434
with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index b14afa3..a6403d0 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -252,7 +252,7 @@ bool GlobalsModRef::AnalyzeUsesOfPointer(Value *V,
} else if (CallInst *CI = dyn_cast<CallInst>(*UI)) {
// Make sure that this is just the function being called, not that it is
// passing into the function.
- for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i)
+ for (unsigned i = 0, e = CI->getNumOperands() - 1; i != e; ++i)
if (CI->getOperand(i) == V) return true;
} else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
// Make sure that this is just the function being called, not that it is