From: Joost Helberg (jhelberg@nl.oracle.com)
Date: 10/02/92


From: jhelberg@nl.oracle.com (Joost Helberg)
Subject: Re: ANNOUNCE: effects of-fomit-frame-pointer
Date: 2 Oct 1992 07:40:57 GMT

hlu@eecs.wsu.edu (H.J. Lu) writes:
: > To: hlu@eecs.wsu.edu
: > Cc: rms@gnu.ai.mit.edu
: > Subject: Re: Linux patches for ss-920925
: >
: > > From: H.J. Lu <hlu@irl.eecs.wsu.edu>
: > > Date: Wed, 30 Sep 92 16:18:31 PDT
: >
: > > One thing puzzles me a lot recently. I compiled gcc ss-920925 with -O2
: > > and -O2 -fomit-frame-pointer. I expected by adding -fomit-frame-pointer
: > > I would get the smaller binaries. But quite the opposite, with -O2, I
: > > got
: >
: > | I have no idea why. The only way to find out is by comparing the
: > | assembler code. If you want to do this, please tell me what you find.
: >
: > Addressing modes that offset the stack pointer are one byte longer than
: > addressing modes that offset the frame pointer. -fomit-frame-pointer
: > only wins if you can get better register allocation by freeing up the
: > frame pointer for reloading.
: > ---
: > James R. Van Artsdalen james@bigtex.cactus.org "Live Free or Die"
: > Dell Computer Co 9505 Arboretum Blvd Austin TX 78759 512-338-8789
: >
:
: -fomit-frame-pointer may give fewer assembler codes, but bigger machine
: codes in certain circumstances.

But far better performance, with only a few registers available on a iapx86, you
win one. I've seen performance gains in the order of 15%.

--
   Joost Helberg Rijnzathe 6
   jhelberg@oracle.nl NL-3454 PV De Meern
   jhelberg@nl.oracle.com The Netherlands

   Oracle Europe BV Product Line Development
   Phone: +31 3406 94211 Fax: +31 3406 65609