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]

Re: Sigh. Inlining heuristics.


On Jul 10, 2001, dewar@gnat.com wrote:

>> How about defaulting to 10^{1+n} for -On?

> wouldn't it be better to have a separate switch to control this. It seems
> bogus to have high values of -O give successively worse performance!

We already do.  My proposal is only for the default value.  And it's
hard to tell whether it's really going to give worse performance.
There's a cache hit, indeed, if you inline the same large function
into multiple other functions, but if you call it only once, and you
get it inlined, you'd be saving the function-call overhead without any
cache hit, as long as branch prediction doesn't mis-predict entering
the inlined function code.  Or so I think, I don't know much about
this stuff :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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