This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: inlining default
- From: Joe Buck <jbuck at synopsys dot COM>
- To: dje at watson dot ibm dot com (David Edelsohn)
- Cc: mark at codesourcery dot com (Mark Mitchell),jason at redhat dot com (Jason Merrill),neil at daikokuya dot demon dot co dot uk (Neil Booth),gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org)
- Date: Thu, 13 Dec 2001 07:59:26 -0800 (PST)
- Subject: Re: inlining default
> >> It seems that Neil's 2001-11-15 changes to option parsing had a side
> >> effect of turning on tree inlining at -O0 for C and C++ unless suppressed
> >> with -fno-inline, because we now set flag_tree_inline from flag_no_inline
> >> before setting flag_no_inline from optimize. Is this what we want? I
> >> would prefer to leave it off by default with -O0, but many compilers turn
> >> it on unless specifically disabled. What do other people think?
>
> Mark> I think we should leave it off at -O0. I can't see a compelling
> Mark> reason to change our historical practice.
David Edelsohn writes:
> Without inlining a -O0, GCC fundamentally uses a different source
> stream with and without optimization. This makes debugging at -O0 more
> difficult.
David, I've been debugging g++-emitted code for about 11 years now, and
it feels quite natural to me. I'd be irritated if the default changed,
as every Makefile I have would need to be changed. Debugging is much more
difficult if the functions specified inline are inlined.
However, now that inlining is possible at -O0, you have the option of
specifying a flag to make it happen. But what's important is that we
should not ask the users to change their Makefiles to avoid a change in
behavior that many would find undesirable.