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

Chris Lattner lattner at cs.uiuc.edu
Wed Mar 23 18:41:35 PST 2005



Changes in directory llvm/lib/Analysis/IPA:

GlobalsModRef.cpp updated: 1.14 -> 1.15
---
Log message:

Simplify dead code into a fixme :)


---
Diffs of the changes:  (+4 -13)

 GlobalsModRef.cpp |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)


Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.14 llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.15
--- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.14	Wed Mar 23 19:22:52 2005
+++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp	Wed Mar 23 20:41:19 2005
@@ -280,19 +280,10 @@
           ModRefBehavior MRB =
             AliasAnalysis::getModRefBehavior(Callee, CallSite());
           if (MRB != DoesNotAccessMemory) {
-            if (MRB == OnlyReadsMemory && CalleeFR) {
-              // This reads memory, but we don't know what, just say that it
-              // reads all globals.
-              for (std::map<GlobalValue*, unsigned>::iterator
-                     GI = CalleeFR->GlobalInfo.begin(),
-                     E = CalleeFR->GlobalInfo.end();
-                   GI != E; ++GI)
-                FR.GlobalInfo[GI->first] |= Ref;
-
-            } else {
-              CallsExternal = true;
-              break;
-            }
+            // FIXME: could make this more aggressive for functions that just
+            // read memory.  We should just say they read all globals.
+            CallsExternal = true;
+            break;
           }
         }
       } else {






More information about the llvm-commits mailing list