This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: bunch of small speed patches
> > IIRC, gcc has automatically done this transformation since at least
> > version 3.0.
>
> That's what I thought, but the profile showed a bunch of fprintf calls
> coming from that location, so...
>
> It may be that the transformation is broken. Is there a test for it?
Yes, assuming it passes, the testcase is:
gcc.c-torture/execute/builtins/fprintf.c.
However like many builtins, this transformation is not done at -O0, so
if you profiled the code without optimization you'll see fprintf
calls. At -O1 or higher it'll be fputs.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu