* -O3.... again
@ 2004-03-16 16:32 Timothy Miller
2004-03-16 16:38 ` Michael Buesch
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Miller @ 2004-03-16 16:32 UTC (permalink / raw)
To: Linux Kernel Mailing List
I know this has been beat to death, but I was wondering about something,
and google isn't being forthcoming.
I understand that the biggest problem with -O3 is the automatic function
inlining. It tends to make things worse, due to cache misses.
Well, the default maximum for automatic inlining for GCC (--param
max-inline-insns-auto=n) is 300 pseudo instructions, which sounds
awfully high to me (although I don't know what a pseudo instruction
quite corresponds to).
Has anyone tinkered with different values for -finline-limit, or
specifically max-inline-insns-auto to see if they could actually get any
benefit out of it?
It seems to me that as a function grows beyond a certain size, the value
of inlining it diminishes rapidly. Only when the function-call overhead
is a significant part of the over-all run-time of the rest of the
function does it really help to inline. Well, if the kernel isn't
getting benefit from the defaults for -O3, then perhaps the defaults are
wrong and need to be tweaked.
Anyone experiment with this? Any thoughts?
I doubt this would apply well right off to the kernel, but right now,
I'm doing gentoo emerges of GCC with varying CFLAGS settings. First, I
emerge GCC with the experimental values of CFLAGS. Then I change the
CFLAGS to a standard setting and time it (the timed run must always have
the same parameters for the target). My objective is to determine the
MINIMUM value of max-inline-insns-auto which yields an improvement over -O2.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-16 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-16 16:32 -O3.... again Timothy Miller
2004-03-16 16:38 ` Michael Buesch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.