This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- To: law at cygnus dot com
- Subject: Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 13 Jan 1999 10:14:26 -0500 (EST)
- Cc: egcs at cygnus dot com
> From: Jeffrey A Law <law@hurl.cygnus.com>
>
> > Can we _split_ instructions at the tree level? That would allow
> > us to do a split_printfs phase eventually.
>
> Not easily. Or more correctly, they are split up as part of expansion
> of arguments. However, there's not a good way to get a handle on the
> sub-calls since they're converted from tree to rtl by recursion.
I'm not sure what you mean, but I'm talking about splitting:
> printf("hello world %s", foo);
into:
> fputs("hello world ", stdout);
> fputs(foo, stdout);
I'm guessing here, but I would think that should be doable by whatever
mechanism inlining uses.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Icon CMT Corp.