RFC: Idea for code size reduction
Richard Guenther
richard.guenther@gmail.com
Fri Mar 7 13:04:00 GMT 2008
On Fri, Mar 7, 2008 at 12:46 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Mar 07, 2008 at 11:10:53AM +0100, Richard Guenther wrote:
> > On Fri, Mar 7, 2008 at 11:02 AM, Philipp Marek <philipp@marek.priv.at> wrote:
>
> > > I wrote some perl scripts to test this. I took a "alldefconfig" i686
> > > kernel, let objdump disassemble it, and on "iret", "ret", "ljmp" or "jmp"
> > > with a 4 byte address I store the last few bytes. Another script goes
> > > through these block-ends, and estimates the number of bytes saved, if
> > > identical sequences get changed into a 5 byte opcode (jump with 32bit
> > > address).
> >
>
> > Sounds like what -frtl-abstract-sequences is trying to do.
>
> Not exactly. AFAIK -frtl-abstract-sequences works at a function level, only
> same sequences within one function are abstracted.
Right - "trying to do" - you'd need to move this to whole-program level
with LTO (preferably on the tree level), but the basic idea of outlining
same sequences is the same.
Richard.
More information about the Gcc
mailing list