This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: inline bug (?)
- From: jorge dot perez at invia dot fr
- To: <ebotcazou at adacore dot com>
- To: <gcc-help at gcc dot gnu dot org>
- To: <axel-freyn at gmx dot de>
- Date: Wed, 17 Nov 2010 19:58:02 +0100
- Subject: Re: inline bug (?)
Thans for your comments guys, I'll follow your suggestions and try other examples and test additional options as well.
I forgot to precise however that I used the option -os (optimizing for size)
Regards
Jorge
In addition to the comments from Eric:
On Wed, Nov 17, 2010 at 06:53:28PM +0100, Eric Botcazou wrote:
> > I appreciate any feedback or suggestions you have about this, maybe I'm
> > doing it all wrong from the begining, but the fact that inline increases
> > the size of the code was weird to me.
>
> The inlining heuristics are complex and tuned for real programs, so it's
> probably easy to fool them with toy examples. Modifying them generally
> requires a lot of retuning efforts so isn't a small undertaking.
If you are not happy with the way gcc inlines "by default", you can
influence the inlining heuristics by many parameters / compile options,
like: large-function-insns, large-function-growth,
inline-unit-growth,...
There is a long list in the manpage ;-)
Axel