Re: [PATCH] x86: Align jump targets to 1 byte boundaries

Ingo Molnar
2015-05-14T19:44:22Z

* Denys Vlasenko <dvlasenk@redhat.com> wrote:

> On 05/14/2015 08:17 PM, Ingo Molnar wrote:
> > There were also these other changes I tested:
> >
> > + # Reduces vmlinux size by 0.25%:
> > + KBUILD_CFLAGS += -fno-caller-saves
> > +
> > + # Reduces vmlinux size by 1.10%:
> > + KBUILD_CFLAGS += -fno-inline-small-functions
> > +
> > + # Reduces vmlinux size by about 0.95%:
> > + KBUILD_CFLAGS += -fno-tree-ch
> >
> > We could maybe consider -fno-caller-saves. What do you think about
> > that option?
>
> Quick googling din't even find what it does.
> It would need a comment :)

The GCC manpage says:

-fcaller-saves
Enable allocation of values to registers that are clobbered
by function calls, by emitting extra instructions to save
and restore the registers around such calls. Such
allocation is done only when it seems to result in better
code.

This option is always enabled by default on certain
machines, usually those which have no call-preserved
registers to use instead.

Enabled at levels -O2, -O3, -Os.

but I have not checked the disassembly.

0.25% defconfig reduction still seems significant.

Thanks,

Ingo