This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sigh. Inlining heuristics.
- To: Daniel Berlin <dan at cgsoftware dot com>
- Subject: Re: Sigh. Inlining heuristics.
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 10 Jul 2001 17:53:31 -0800
- cc: Linus Torvalds <torvalds at transmeta dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
> 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.
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.
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. :-)