Fix a minor bug, implementing GCSE/call_pure_function.ll
authorChris Lattner <sabre@nondot.org>
Mon, 15 Mar 2004 04:18:28 +0000 (04:18 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Mar 2004 04:18:28 +0000 (04:18 +0000)
Also, add some stuff I missed before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12417 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BasicAliasAnalysis.cpp

index 967b453ed522f192e686b5de71422c0ee18fca3f..9b6258edd3f4d3bc7d6fe7c6cd7d7a154a948c23 100644 (file)
@@ -186,9 +186,8 @@ BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
         return NoModRef;
     }
 
-  // If P points to a constant memory location, the call definitely could not
-  // modify the memory location.
-  return pointsToConstantMemory(P) ? Ref : ModRef;
+  // The AliasAnalysis base class has some smarts, lets use them.
+  return AliasAnalysis::getModRefInfo(CS, P, Size);
 }
 
 // alias - Provide a bunch of ad-hoc rules to disambiguate in common cases, such
@@ -597,12 +596,16 @@ static const char *DoesntAccessMemoryTable[] = {
   "sin", "sinf", "sinl",      "sinh", "sinhf", "sinhl",
   "tan", "tanf", "tanl",      "tanh", "tanhf", "tanhl",
 
+  // ctype.h
   "isalnum", "isalpha", "iscntrl", "isdigit", "isgraph", "islower", "isprint"
   "ispunct", "isspace", "isupper", "isxdigit", "tolower", "toupper",
 
+  // wctype.h"
   "iswalnum", "iswalpha", "iswcntrl", "iswdigit", "iswgraph", "iswlower",
   "iswprint", "iswpunct", "iswspace", "iswupper", "iswxdigit",
 
+  "iswctype", "towctrans", "towlower", "towupper", 
+
   "btowc", "wctob", 
 };