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
This commit is contained in:
Richard Osborne
2011-03-03 13:17:51 +00:00
parent 49d7999b89
commit 3649824bec
4 changed files with 78 additions and 11 deletions
+4 -1
View File
@@ -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);
}