summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-11-10 03:11:06 +0000
committerMeador Inge <meadori@codesourcery.com>2012-11-10 03:11:06 +0000
commit2526a42ef1b41b339c3e7bd4a51864bb63eaa8fa (patch)
treec8c64b8ed587c0061ac98446211fb22b25ac6d4b /llvm/lib/Target/TargetLibraryInfo.cpp
parenta17fea1967e5d6fc05c7d08a8e0e04e9031fc0aa (diff)
downloadbcm5719-llvm-2526a42ef1b41b339c3e7bd4a51864bb63eaa8fa.tar.gz
bcm5719-llvm-2526a42ef1b41b339c3e7bd4a51864bb63eaa8fa.zip
Add more functions to the target library information.
In the process of migrating optimizations from the simplify-libcalls pass to the instcombine pass I noticed that a few functions are missing from the target library information. These functions need to be available for querying in the instcombine library call simplifiers. More functions will probably be added in the future as more simplifiers are migrated to instcombine. llvm-svn: 167659
Diffstat (limited to 'llvm/lib/Target/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetLibraryInfo.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLibraryInfo.cpp b/llvm/lib/Target/TargetLibraryInfo.cpp
index 62f973e6583..6d4eab12045 100644
--- a/llvm/lib/Target/TargetLibraryInfo.cpp
+++ b/llvm/lib/Target/TargetLibraryInfo.cpp
@@ -152,9 +152,12 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
"sqrt",
"sqrtf",
"sqrtl",
+ "stpcpy",
"strcat",
"strchr",
+ "strcmp",
"strcpy",
+ "strcspn",
"strdup",
"strlen",
"strncat",
@@ -162,6 +165,17 @@ const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
"strncpy",
"strndup",
"strnlen",
+ "strpbrk",
+ "strrchr",
+ "strspn",
+ "strstr",
+ "strtod",
+ "strtof",
+ "strtol",
+ "strtold",
+ "strtoll",
+ "strtoul",
+ "strtoull",
"tan",
"tanf",
"tanh",
@@ -309,6 +323,10 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
TLI.setUnavailable(LibFunc::tanf);
TLI.setUnavailable(LibFunc::tanhf);
}
+
+ // Win32 does *not* provide stpcpy. It is provided on POSIX systems:
+ // http://pubs.opengroup.org/onlinepubs/9699919799/functions/stpcpy.html
+ TLI.setUnavailable(LibFunc::stpcpy);
}
}
OpenPOWER on IntegriCloud