This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problem inlining in c++ (was Re: Patch to add __builtin_printf -> fputs transformations)
- To: rth at cygnus dot com
- Subject: Re: Problem inlining in c++ (was Re: Patch to add __builtin_printf -> fputs transformations)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 21 Sep 2000 22:14:59 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
> From: Richard Henderson <rth@cygnus.com>
>
> On Wed, Sep 20, 2000 at 10:29:03PM -0400, Kaveh R. Ghazi wrote:
> > However the C++ front end emits the __builtin_stdout function
> > out-of-line and issues a call to it when gathering the fputs args.
>
> This is because C++ does inlining at the tree level, not
> the RTL level. In a short while, the C front end will do
> the same thing.
Okay, thanks for the info.
> So, like I mentioned before, we should probably be doing
> these sorts of optimizations in the front end instead of
> in builtins.c.
> r~
I can see why now, at least for this particular one requiring inlining
of stdout. However builtins.c has served well for all the other opts
I've done, I see no reason to abandon it. (I'm not sure if you meant
for your comment to apply to all the stdio opts or just the one
requiring stdout.)
Understanding the tree based inlining is likely to take me some time,
so I'll finish up the other builtins.c based ones and get back to this
later. (Sigh.)
In the mean time, would you please take a look at:
http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00921.html
so I can finish up this thread?
Thanks,
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions