Re: [tip:x86/asm] x86/defconfig: Turn onCONFIG_CC_OPTIMIZE_FOR_SIZE= y in the 64-bit defconfig

From: Ingo Molnar
Date: Sun Jan 27 2013 - 07:49:34 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Sat, 2013-01-26 at 11:43 -0800, Linus Torvalds wrote:
>
> > The problem, of course, is that most -O2 code generation is done
> > assuming hot loops that don't show much if any I$ issues. And the -Os
> > thing is done *purely* for size, not taking any performance into
> > account at all. There's no balanced middle ground, which is what _we_
> > would want.
>
> Gcc needs to implement a -Olinus

What we really want is a sane default for 'library code'
optimization:

- cache-cold optimizations for run-through-once non-looping
code (-Os)

- good loop optimizations for anything that arguably loops (-O2)

- plus common-sense fixes to -Os like not throwing away
explicit branch hints we go to great pains to insert.

Possibly some time this decade.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/