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: -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


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