summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-16 05:38:02 +0000
committerChris Lattner <sabre@nondot.org>2004-08-16 05:38:02 +0000
commit12324753f200d1e3af6ac00dc203af005ebbcce6 (patch)
tree6b3a0bed88f97bc1926647f824e9092fb424594d
parentf2e9ea21061e21820a7b5053b7423253e75d84a1 (diff)
downloadbcm5719-llvm-12324753f200d1e3af6ac00dc203af005ebbcce6.tar.gz
bcm5719-llvm-12324753f200d1e3af6ac00dc203af005ebbcce6.zip
Fix a bug that caused the pass to go into infinite loops on trivial testcases.
This is fallout of the Bug 122 changes. llvm-svn: 15811
-rw-r--r--llvm/lib/Analysis/IPA/Andersens.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp
index 12f0fc30065..54dfd7458d1 100644
--- a/llvm/lib/Analysis/IPA/Andersens.cpp
+++ b/llvm/lib/Analysis/IPA/Andersens.cpp
@@ -251,7 +251,8 @@ namespace {
///
Node *getNode(Value *V) {
if (Constant *C = dyn_cast<Constant>(V))
- return getNodeForConstantPointer(C);
+ if (!isa<GlobalValue>(C))
+ return getNodeForConstantPointer(C);
std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
if (I == ValueNodes.end()) {
OpenPOWER on IntegriCloud