Re: [PATCH] Kconfig: default to CC_OPTIMIZE_FOR_PERFORMANCE_O3 for gcc >= 10

From: Arnd Bergmann
Date: Fri May 08 2020 - 09:04:48 EST


On Fri, May 8, 2020 at 2:07 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> On Fri, May 8, 2020 at 5:56 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> The other significant thing -- and what prompted this patchset -- is
> it looks like gcc 10 has lowered the inlining degree for -O2, and put
> gcc 9's inlining parameters from -O2 into gcc-10's -O3.

I suspect it is more complicated than that, as there are a number of
parameters that determine inlining decisions. It's also not clear whether
the ones for -O3 are generally better than the ones with -O2, or if it's
just that whatever changed caused a few surprises but is otherwise
preferable.

Did you see regressions in specific modules, or just a general slowdown
or growth in object size as the result?

Arnd