llvm.org GIT mirror llvm / 939f500
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167659 91177308-0d34-0410-b5e6-96231b3b80d8 Meador Inge 7 years ago
2 changed file(s) with 47 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
275275 sqrtf,
276276 /// long double sqrtl(long double x);
277277 sqrtl,
278 /// char *stpcpy(char *s1, const char *s2);
279 stpcpy,
278280 /// char *strcat(char *s1, const char *s2);
279281 strcat,
280282 /// char *strchr(const char *s, int c);
281283 strchr,
284 /// int strcmp(const char *s1, const char *s2);
285 strcmp,
282286 /// char *strcpy(char *s1, const char *s2);
283287 strcpy,
288 /// size_t strcspn(const char *s1, const char *s2);
289 strcspn,
284290 /// char *strdup(const char *s1);
285291 strdup,
286292 /// size_t strlen(const char *s);
295301 strndup,
296302 /// size_t strnlen(const char *s, size_t maxlen);
297303 strnlen,
304 /// char *strpbrk(const char *s1, const char *s2);
305 strpbrk,
306 /// char *strrchr(const char *s, int c);
307 strrchr,
308 /// size_t strspn(const char *s1, const char *s2);
309 strspn,
310 /// char *strstr(const char *s1, const char *s2);
311 strstr,
312 /// double strtod(const char *nptr, char **endptr);
313 strtod,
314 /// float strtof(const char *nptr, char **endptr);
315 strtof,
316 /// long int strtol(const char *nptr, char **endptr, int base);
317 strtol,
318 /// long double strtold(const char *nptr, char **endptr);
319 strtold,
320 /// long long int strtoll(const char *nptr, char **endptr, int base);
321 strtoll,
322 /// unsigned long int strtoul(const char *nptr, char **endptr, int base);
323 strtoul,
324 /// unsigned long long int strtoull(const char *nptr, char **endptr,
325 /// int base);
326 strtoull,
298327 /// double tan(double x);
299328 tan,
300329 /// float tanf(float x);
151151 "sqrt",
152152 "sqrtf",
153153 "sqrtl",
154 "stpcpy",
154155 "strcat",
155156 "strchr",
157 "strcmp",
156158 "strcpy",
159 "strcspn",
157160 "strdup",
158161 "strlen",
159162 "strncat",
161164 "strncpy",
162165 "strndup",
163166 "strnlen",
167 "strpbrk",
168 "strrchr",
169 "strspn",
170 "strstr",
171 "strtod",
172 "strtof",
173 "strtol",
174 "strtold",
175 "strtoll",
176 "strtoul",
177 "strtoull",
164178 "tan",
165179 "tanf",
166180 "tanh",
308322 TLI.setUnavailable(LibFunc::tanf);
309323 TLI.setUnavailable(LibFunc::tanhf);
310324 }
325
326 // Win32 does *not* provide stpcpy. It is provided on POSIX systems:
327 // http://pubs.opengroup.org/onlinepubs/9699919799/functions/stpcpy.html
328 TLI.setUnavailable(LibFunc::stpcpy);
311329 }
312330 }
313331