This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: On inlining in C++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]