diff options
author | Richard Osborne <richard@xmos.com> | 2011-03-03 14:09:28 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2011-03-03 14:09:28 +0000 |
commit | 419454ad3720b8cf4613d9e790669c8beaccd1a4 (patch) | |
tree | 4a708cde9e05335c87db1a4b789f94010d66a077 /lib/Target/TargetLibraryInfo.cpp | |
parent | 12785e87e88309c1934add000b754eba51a6c391 (diff) | |
download | external_llvm-419454ad3720b8cf4613d9e790669c8beaccd1a4.zip external_llvm-419454ad3720b8cf4613d9e790669c8beaccd1a4.tar.gz external_llvm-419454ad3720b8cf4613d9e790669c8beaccd1a4.tar.bz2 |
Optimize sprintf -> siprintf if there are no floating point arguments
and siprintf is available on the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLibraryInfo.cpp')
-rw-r--r-- | lib/Target/TargetLibraryInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/TargetLibraryInfo.cpp b/lib/Target/TargetLibraryInfo.cpp index 6bf6c0d..345d914 100644 --- a/lib/Target/TargetLibraryInfo.cpp +++ b/lib/Target/TargetLibraryInfo.cpp @@ -31,9 +31,11 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T) { if (T.getOS() != Triple::Darwin || T.getDarwinMajorNumber() < 9) TLI.setUnavailable(LibFunc::memset_pattern16); - // iprintf is only available on XCore. - if (T.getArch() != Triple::xcore) + // iprintf and friends are only available on XCore. + if (T.getArch() != Triple::xcore) { TLI.setUnavailable(LibFunc::iprintf); + TLI.setUnavailable(LibFunc::siprintf); + } } |