Re: [PATCH] x86: Align jump targets to 1 byte boundaries
From: Ingo Molnar
Date: Thu May 14 2015 - 15:44:25 EST
* Denys Vlasenko <dvlasenk@xxxxxxxxxx> 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
--
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/