This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On inlining in C++
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: Robert Dewar <dewar at gnat dot com>, gdr at integrable-solutions dot net, jbuck at synopsys dot com, gcc at gcc dot gnu dot org
- Date: Tue, 05 Aug 2003 10:56:55 +0200
- Subject: Re: On inlining in C++
- References: <20030804163548.93772F2D7E@nile.gnat.com> <wvnr840364k.fsf@talisman.cambridge.redhat.com>
Op di 05-08-2003, om 09:39 schreef Richard Sandiford:
> So (IMO) if g++ is going to ignore inline requests for "inlineable"
> functions, the data in favour of that should be overwhelming. It's a
> bit worrying that g++ is already doing this and that no-one seems to
> have a large body of existing data to justify it.
See http://gcc.gnu.org/ml/gcc/2003-07/msg02138.html for a patch that
tells the tree inliner to disregard limits for C++ if the function is
declared `inline'.
This effectively forces `inline' functions to be inlined (unless of
course there are other reasons why inlining is not possible, such as
calls to alloca(), or if the function body isn't available yet).
So far, no-one has actually tried it and produced numbers.
> Even if we change gcc in the way that Gaby suggests, we could still
> provide the existing behaviour as a flag.
Yup, it's easy enough.
Gr.
Steven