diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-11-14 16:47:45 -0800 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-11-15 10:12:39 -0800 |
commit | 923f52fb3f6670e843ffe0b8da2f2bad898d752c (patch) | |
tree | a279587ac525162817217dbbe0f01a91893a9d0b /include/llvm | |
parent | f4099a3c92570a80cd9a3850cda598c5ea446b96 (diff) | |
parent | 08e9cb46feb0c8e08e3d309a0f9fd75a04ca54fb (diff) |
Merge commit '08e9cb46feb0c8e08e3d309a0f9fd75a04ca54fb'
(svn r167699, also the 3.2 branch point)
Conflicts:
lib/Target/X86/X86Subtarget.cpp
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/MC/MCExpr.h | 1 | ||||
-rw-r--r-- | include/llvm/Target/TargetLibraryInfo.h | 29 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/SimplifyLibCalls.h | 11 |
3 files changed, 40 insertions, 1 deletions
diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h index 4c10e5114a..00eef270d6 100644 --- a/include/llvm/MC/MCExpr.h +++ b/include/llvm/MC/MCExpr.h @@ -167,6 +167,7 @@ public: VK_ARM_TPOFF, VK_ARM_GOTTPOFF, VK_ARM_TARGET1, + VK_ARM_TARGET2, VK_PPC_TOC, // TOC base VK_PPC_TOC_ENTRY, // TOC entry diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index 2a0a43229f..a2c97d782e 100644 --- a/include/llvm/Target/TargetLibraryInfo.h +++ b/include/llvm/Target/TargetLibraryInfo.h @@ -276,12 +276,18 @@ namespace llvm { sqrtf, /// long double sqrtl(long double x); sqrtl, + /// char *stpcpy(char *s1, const char *s2); + stpcpy, /// char *strcat(char *s1, const char *s2); strcat, /// char *strchr(const char *s, int c); strchr, + /// int strcmp(const char *s1, const char *s2); + strcmp, /// char *strcpy(char *s1, const char *s2); strcpy, + /// size_t strcspn(const char *s1, const char *s2); + strcspn, /// char *strdup(const char *s1); strdup, /// size_t strlen(const char *s); @@ -296,6 +302,29 @@ namespace llvm { strndup, /// size_t strnlen(const char *s, size_t maxlen); strnlen, + /// char *strpbrk(const char *s1, const char *s2); + strpbrk, + /// char *strrchr(const char *s, int c); + strrchr, + /// size_t strspn(const char *s1, const char *s2); + strspn, + /// char *strstr(const char *s1, const char *s2); + strstr, + /// double strtod(const char *nptr, char **endptr); + strtod, + /// float strtof(const char *nptr, char **endptr); + strtof, + /// long int strtol(const char *nptr, char **endptr, int base); + strtol, + /// long double strtold(const char *nptr, char **endptr); + strtold, + /// long long int strtoll(const char *nptr, char **endptr, int base); + strtoll, + /// unsigned long int strtoul(const char *nptr, char **endptr, int base); + strtoul, + /// unsigned long long int strtoull(const char *nptr, char **endptr, + /// int base); + strtoull, /// double tan(double x); tan, /// float tanf(float x); diff --git a/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/include/llvm/Transforms/Utils/SimplifyLibCalls.h index 5db2d00181..fde452bca2 100644 --- a/include/llvm/Transforms/Utils/SimplifyLibCalls.h +++ b/include/llvm/Transforms/Utils/SimplifyLibCalls.h @@ -19,6 +19,7 @@ namespace llvm { class Value; class CallInst; class DataLayout; + class Instruction; class TargetLibraryInfo; class LibCallSimplifierImpl; @@ -35,8 +36,16 @@ namespace llvm { /// optimizeCall - Take the given call instruction and return a more /// optimal value to replace the instruction with or 0 if a more - /// optimal form can't be found. + /// optimal form can't be found. Note that the returned value may + /// be equal to the instruction being optimized. In this case all + /// other instructions that use the given instruction were modified + /// and the given instruction is dead. Value *optimizeCall(CallInst *CI); + + /// replaceAllUsesWith - This method is used when the library call + /// simplifier needs to replace instructions other than the library + /// call being modified. + virtual void replaceAllUsesWith(Instruction *I, Value *With) const; }; } // End llvm namespace |