[llvm-commits] [llvm] r56115 - /llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp

Duncan Sands baldrick at free.fr
Thu Sep 11 12:35:55 PDT 2008


Author: baldrick
Date: Thu Sep 11 14:35:55 2008
New Revision: 56115

URL: http://llvm.org/viewvc/llvm-project?rev=56115&view=rev
Log:
Intrinsics don't touch internal global variables
(unless passed one via a parameter), even if they
are IntrWriteMem.

Modified:
    llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp

Modified: llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp?rev=56115&r1=56114&r2=56115&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/GlobalsModRef.cpp Thu Sep 11 14:35:55 2008
@@ -392,8 +392,10 @@
               FR.GlobalInfo[*GI] |= Ref;
           }
         } else {
-          // Can't say anything useful.
-          KnowNothing = true;
+          FunctionEffect |= ModRef;
+          // Can't say anything useful unless it's an intrinsic - they don't
+          // read or write global variables of the kind considered here.
+          KnowNothing = !F->isIntrinsic();
         }
         continue;
       }





More information about the llvm-commits mailing list