[llvm-commits] [PATCH] Optimize printf -> iprintf if there are no floating point arguments

Chris Lattner clattner at apple.com
Thu Mar 3 14:26:03 PST 2011


On Mar 3, 2011, at 5:30 AM, Richard Osborne wrote:

> If you return the existing call then SimplifyLibCalls tries to erase it, see the following comment:
> 
>  /// CallOptimizer - This pure virtual method is implemented by base classes to
>  /// do various optimizations.  If this returns null then no transformation was
>  /// performed.  If it returns CI, then it transformed the call and CI is to be
>  /// deleted.  If it returns something else, replace CI with the new value and
>  /// delete CI.
> 
> I've change the code to clone the call and return the clone after changing the callee. This means EmitIPrintF is no longer needed.
> 
> I've also fixed the issue in the testcase spotted by Frits.
> 
> Committed in r126935
> 
> Thanks for the review comments.

Thanks Richard!

-Chris



More information about the llvm-commits mailing list