diff options
author | Richard Osborne <richard@xmos.com> | 2011-03-03 13:17:51 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2011-03-03 13:17:51 +0000 |
commit | 3649824bec09768cbdee7aa7cfbbcdd865373626 (patch) | |
tree | aa1aee521af7f6df2bab2c11622fe94c257c6070 /lib/Target/TargetLibraryInfo.cpp | |
parent | 49d7999b89759a1b58180fec9c491ba05204c95c (diff) |
Optimize printf -> iprintf if there are no floating point arguments
and iprintf is available on the target. Currently iprintf is only
marked as being available on the XCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLibraryInfo.cpp')
-rw-r--r-- | lib/Target/TargetLibraryInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/TargetLibraryInfo.cpp b/lib/Target/TargetLibraryInfo.cpp index c8bed18ffa..6bf6c0d1a6 100644 --- a/lib/Target/TargetLibraryInfo.cpp +++ b/lib/Target/TargetLibraryInfo.cpp @@ -30,7 +30,10 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T) { // memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later. if (T.getOS() != Triple::Darwin || T.getDarwinMajorNumber() < 9) TLI.setUnavailable(LibFunc::memset_pattern16); - + + // iprintf is only available on XCore. + if (T.getArch() != Triple::xcore) + TLI.setUnavailable(LibFunc::iprintf); } |