From 3649824bec09768cbdee7aa7cfbbcdd865373626 Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Thu, 3 Mar 2011 13:17:51 +0000 Subject: 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 --- lib/Target/TargetLibraryInfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Target/TargetLibraryInfo.cpp') 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); } -- cgit v1.2.3-70-g09d2