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: dewar at gnat dot com (Robert Dewar)
- To: austern at apple dot com, galibert at pobox dot com
- Cc: Richard dot Earnshaw at arm dot com, aph at redhat dot com, dewar at gnat dot com,echristo at redhat dot com, gcc at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 13:08:58 -0500 (EST)
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
> 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.)
It's dubious even for a "state of the art optimizing compiler" The programmer
often knows better than any compiler what should be inlined.