public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: John Carr <jfc@mit.edu>
To: Joe Buck <jbuck@synopsys.com>
Cc: egcs@cygnus.com
Subject: Re: increase in object code size
Date: Tue, 23 Sep 1997 11:45:00 -0000	[thread overview]
Message-ID: <199709231845.OAA14441@biohazard-cafe.MIT.EDU> (raw)
In-Reply-To: <199709231738.KAA15868@atrus.synopsys.com>

> > On 80386, -fno-exceptions reduces size by about 25%.
> 
> That much?  On sparc-sun-solaris2.5.1, size -A on a stripped cc1 from the
> latest snapshot gives
> 
> section         size         addr
> .text        1537124       166460
> .eh_frame      72120      1980396
> 
> .eh_frame is only 4.7% of .text here.  Is the bloat that much larger
> for x86?  Why?

On x86 every stack push requires a 7 byte entry in the traceback table
so the unwinder knows how to adjust the stack pointer to find the
return address.

The first optimization which comes to mind: an exception table entry
which does not apply to an instruction which can throw an exception
should be eliminated.  In GNU C and C++ (and, I think, GNU Ada) only
function calls throw exceptions.  That means there needs to be at most
one table entry per function call.

The second (x86 only): if a function does not have any exception
handlers and it has a frame pointer the unwinder does not need an
exception table.  The return PC is at a known offset from the frame
pointer.

("exception handler" here includes implicitly defined handlers in C++
to call destructors for local variables.)


  parent reply	other threads:[~1997-09-23 11:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-23  7:21 Thomas Koenig
1997-09-23  9:32 ` Joe Buck
1997-09-23 10:03   ` John Carr
1997-09-23 10:16     ` Joe Buck
     [not found]     ` <199709231716.KAA13154.cygnus.egcs@atrus.synopsys.com>
1997-09-23 10:34       ` Jason Merrill
1997-09-23 10:38     ` Joe Buck
1997-09-23 10:56       ` Thomas Koenig
1997-09-24  1:58         ` Jakub Jelinek
     [not found]       ` <199709231755.TAA00725.cygnus.egcs@mvmap66.ciw.uni-karlsruhe.de>
1997-09-23 11:23         ` Jason Merrill
1997-09-24  2:33           ` Torbjorn Lindgren
1997-09-23 11:45       ` John Carr [this message]
1997-09-23 17:03         ` Richard Henderson
1997-09-23 17:16           ` Joe Buck
1997-09-28 14:43           ` Joern Rennecke
     [not found]         ` <199709240001.RAA05779.cygnus.egcs@dot.cygnus.com>
1997-09-23 18:25           ` Jason Merrill
1997-09-23 22:08             ` Richard Henderson
1997-09-23 22:46               ` Jason Merrill
1997-09-23 22:56                 ` David S. Miller
1997-09-24  0:11                 ` Richard Henderson
     [not found]       ` <199709231845.OAA14441.cygnus.egcs@biohazard-cafe.MIT.EDU>
1997-09-23 18:32         ` Jason Merrill
1997-09-24  3:12 ` code size/ linux -fno-strength-reduce Mark Phillips
1997-09-29  7:08   ` Horst von Brand
     [not found] <199709231643.KAA27118@harmony.village.org>
1997-09-23 10:05 ` increase in object code size Thomas Koenig
     [not found] <199709232337.TAA00381@pincoya.inf.utfsm.cl>
1997-09-23 18:21 ` Jason Merrill
1997-09-24  7:13   ` Horst von Brand
1997-09-23 19:09 Mike Stump
1997-09-23 21:29 ` Joe Buck
1997-09-24  9:46 Mike Stump

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199709231845.OAA14441@biohazard-cafe.MIT.EDU \
    --to=jfc@mit.edu \
    --cc=egcs@cygnus.com \
    --cc=jbuck@synopsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).