This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fobey-inline (was Re: gcc and inlining)
- From: Matt Austern <austern at apple dot com>
- To: Olivier Galibert <galibert at pobox dot com>
- Cc: Eric Christopher <echristo at redhat dot com>, Robert Dewar <dewar at gnat dot com>, Richard dot Earnshaw at arm dot com, aph at redhat dot com, gcc at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 09:57:25 -0800
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
On Friday, March 14, 2003, at 03:11 AM, Olivier Galibert wrote:
On Thu, Mar 13, 2003 at 04:40:38PM -0800, Eric Christopher wrote:
Something that is given as implementation specific can occasionally be
worked out among different compiler vendors, you stand a better chance
of getting the behavior into the language than to get that type of
coordination.
Funnily enough, for every other decent compiler out there, "inline"
means "inline if you can".
That's not true. Most compilers that I know of use heuristics to decide
whether or not to do inlining, and will ignore a request to inline an
excessively large function. Some compilers ignore the inline keyword
altogether, and use information gained from interprocedural analysis
do decide whether to do inlining. (Note: I'm not suggesting that gcc
go down that route, at least not yet. That sort of thing only makes
sense for a state of the art optimizing compiler, which gcc isn't.)
--Matt