summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2011-03-03 13:17:51 +0000
committerRichard Osborne <richard@xmos.com>2011-03-03 13:17:51 +0000
commit815de536e519e9c271e0da9d8910db0d5f72ce46 (patch)
tree26b535fc2a2aade6018065997b5d90aa5b02ed1a /llvm/lib/Target/TargetLibraryInfo.cpp
parent3bc0bcf3ada43099958d95739c04bede60e72767 (diff)
downloadbcm5719-llvm-815de536e519e9c271e0da9d8910db0d5f72ce46.tar.gz
bcm5719-llvm-815de536e519e9c271e0da9d8910db0d5f72ce46.zip
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. llvm-svn: 126935
Diffstat (limited to 'llvm/lib/Target/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetLibraryInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetLibraryInfo.cpp b/llvm/lib/Target/TargetLibraryInfo.cpp
index c8bed18ffab..6bf6c0d1a6b 100644
--- a/llvm/lib/Target/TargetLibraryInfo.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud