This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sigh. Inlining heuristics.
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Sigh. Inlining heuristics.
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Tue, 10 Jul 2001 14:24:35 -0400
- Cc: Daniel Berlin <dan at cgsoftware dot com>,Linus Torvalds <torvalds at transmeta dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- References: <2650166339.994787611@[192.168.0.164]>
Mark Mitchell <mark@codesourcery.com> writes:
>> I'm using -O3.
>> At -O2, it doesn't inline it.
>
> That's what -O3 means. It means treat all functions as candidates for
> inlining. I think that behavior dates to handling C89, where `inline'
> is not a keyword, but sometimes you want the compiler to inline things
> anyhow.
Yes, yes, I know, it was 3:30am, and my brain failed to work
properly.
>
> I've never personally found -O3 to be useful for anything, in C or C++,
> ever, precisely because of this problem; clearly ACT has had the same
> experience. So, it's good if you find a way to impose heuristics that do
> the right thing more often.
O3 will become important when we have a better inlining
architecture. Like I said, once diego's basic blocks on trees stuff is
there, we'll have the basis for doing profile guided inlining (with
fake or real profile info).
>
> Anyhow, this has nothing to do with flag_default_inline; it's a
> different flag.
>
> Would you try just cranking down the limit? I bet that is an 85%
> solution, i.e., one that may make this not a big issue any more. That
> is good, because there are lots of other big issues. :-)
Sure, i'll give it a try.
--
"Babies don't need a vacation, but I still see them at the
beach... It pisses me off! I'll go over to a little baby and
say, "What are you doing here? You haven't worked a day in your
life!"
"-Steven Wright