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 10:08 AM, Robert Dewar wrote:

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.

Sometimes. But this isn't really an argument we need to have, since the two of us agree that (a) gcc as it stands now shouldn't ignore the 'inline' keyword, and (b) there should be some kind of mechanism for programmers to force inlining in the unusual circumstances where they need that kind of low-level control.


--Matt


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