Add some missing functions. Make sure to handle calls together in case the
authorChris Lattner <sabre@nondot.org>
Tue, 16 Mar 2004 03:41:35 +0000 (03:41 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 Mar 2004 03:41:35 +0000 (03:41 +0000)
client has another VN implementation that can VN calls.

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

lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/LoadValueNumbering.cpp

index 9b6258edd3f4d3bc7d6fe7c6cd7d7a154a948c23..4a8a68036466e9c322cb9cb5d6927ba06129369a 100644 (file)
@@ -607,6 +607,17 @@ static const char *DoesntAccessMemoryTable[] = {
   "iswctype", "towctrans", "towlower", "towupper", 
 
   "btowc", "wctob", 
+
+  "isinf", "isnan", "finite",
+
+  // C99 math functions
+  "copysign", "copysignf", "copysignd",
+  "nexttoward", "nexttowardf", "nexttowardd",
+  "nextafter", "nextafterf", "nextafterd",
+
+  // glibc functions:
+  "__fpclassify", "__fpclassifyf", "__fpclassifyl",
+  "__signbit", "__signbitf", "__signbitl",
 };
 
 static const unsigned DAMTableSize =
@@ -636,16 +647,23 @@ bool BasicAliasAnalysis::doesNotAccessMemory(Function *F) {
 
 
 static const char *OnlyReadsMemoryTable[] = {
-  "atoi", "atol", "atof", "atoll", "atoq",
-  "bcmp", "memcmp", "memchr", "wmemcmp", "wmemchr", 
+  "atoi", "atol", "atof", "atoll", "atoq", "a64l",
+  "bcmp", "memcmp", "memchr", "memrchr", "wmemcmp", "wmemchr", 
 
   // Strings
   "strcmp", "strcasecmp", "strcoll", "strncmp", "strncasecmp",
   "strchr", "strcspn", "strlen", "strpbrk", "strrchr", "strspn", "strstr", 
+  "index", "rindex",
 
   // Wide char strings
   "wcschr", "wcscmp", "wcscoll", "wcscspn", "wcslen", "wcsncmp", "wcspbrk",
   "wcsrchr", "wcsspn", "wcsstr", 
+
+  // glibc
+  "alphasort", "alphasort64", "versionsort", "versionsort64",
+
+  // C99
+  "nan", "nanf", "nand",
 };
 
 static const unsigned ORMTableSize =
index a71ade6d6146df86c0dda5f7e0820a0704f54454..b67aaddde32c094fa7802283b96c446d8df148f1 100644 (file)
@@ -247,7 +247,7 @@ void LoadVN::getEqualNumberNodes(Value *V,
 
   if (!isa<LoadInst>(V)) {
     if (CallInst *CI = dyn_cast<CallInst>(V))
-      return getCallEqualNumberNodes(CI, RetVals);
+      getCallEqualNumberNodes(CI, RetVals);
 
     // Not a load instruction?  Just chain to the base value numbering
     // implementation to satisfy the request...