[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 15 22:38:15 PDT 2004



Changes in directory llvm/lib/Analysis/IPA:

Andersens.cpp updated: 1.5 -> 1.6
---
Log message:

Fix a bug that caused the pass to go into infinite loops on trivial testcases.

This is fallout of the Bug 122: http://llvm.cs.uiuc.edu/PR122  changes.



---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.5 llvm/lib/Analysis/IPA/Andersens.cpp:1.6
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.5	Sat Jul 17 19:18:30 2004
+++ llvm/lib/Analysis/IPA/Andersens.cpp	Mon Aug 16 00:38:02 2004
@@ -251,7 +251,8 @@
     ///
     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()) {






More information about the llvm-commits mailing list