This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sigh. Inlining heuristics.
- To: dewar at gnat dot com
- Subject: Re: Sigh. Inlining heuristics.
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 10 Jul 2001 22:49:12 -0300
- Cc: mark at codesourcery dot com, dan at cgsoftware dot com, gcc at gcc dot gnu dot org, torvalds at transmeta dot com
- Organization: GCC Team, Red Hat
- References: <20010711004023.79DC8F2B5A@nile.gnat.com>
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