summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-09-03 00:18:58 +0000
committerGabor Greif <ggreif@gmail.com>2009-09-03 00:18:58 +0000
commit14dfba6d6691218a791942429f5b3d19ca8f6980 (patch)
tree0ed5b95a547a2e485a900ddd1883fa432e47c49c /llvm/lib/Analysis
parentf400442927956601208bdc8033fca9d37a16cd9b (diff)
downloadbcm5719-llvm-14dfba6d6691218a791942429f5b3d19ca8f6980.tar.gz
bcm5719-llvm-14dfba6d6691218a791942429f5b3d19ca8f6980.zip
re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...
llvm-svn: 80858
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/IPA/Andersens.cpp2
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp
index 9de1fcc5c19..6f21a4f2ed9 100644
--- a/llvm/lib/Analysis/IPA/Andersens.cpp
+++ b/llvm/lib/Analysis/IPA/Andersens.cpp
@@ -1018,7 +1018,7 @@ bool Andersens::AnalyzeUsesOfFunction(Value *V) {
} else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
// Make sure that this is just the function being called, not that it is
// passing into the function.
- for (unsigned i = 3, e = II->getNumOperands(); i != e; ++i)
+ for (unsigned i = 0, e = II->getNumOperands() - 3; i != e; ++i)
if (II->getOperand(i) == V) return true;
} else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(*UI)) {
if (CE->getOpcode() == Instruction::GetElementPtr ||
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 2e9884aa01b..bfc6e117bdc 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -244,7 +244,7 @@ bool GlobalsModRef::AnalyzeUsesOfPointer(Value *V,
} else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) {
// Make sure that this is just the function being called, not that it is
// passing into the function.
- for (unsigned i = 3, e = II->getNumOperands(); i != e; ++i)
+ for (unsigned i = 0, e = II->getNumOperands() - 3; i != e; ++i)
if (II->getOperand(i) == V) return true;
} else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(*UI)) {
if (CE->getOpcode() == Instruction::GetElementPtr ||
OpenPOWER on IntegriCloud