[LLVMdev] Implementing platform specific library call simplification

Richard Osborne richard at xmos.com
Wed Feb 2 10:11:12 PST 2011


The newlib C library provides iprintf(), a restricted version of printf 
without support for floating-point formatting. I'd like to add an 
optimization which turns calls to printf() into calls to iprintf() if 
the format string has no floating point specifiers.

At the moment I've got this working locally by adding code to the 
simplify-libcalls pass. However this will break on targets where 
iprintf() isn't available. Is there a sensible place to add information 
about which library functions are available for a particular target?

Thanks,

Richard

-- 
Richard Osborne | XMOS
http://www.xmos.com




More information about the llvm-dev mailing list