public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marc Espie <espie@quatramaran.ens.fr>
To: john@feith.com
Cc: egcs@egcs.cygnus.com
Subject: Re: ridiculous amounts of padding
Date: Sun, 31 Jan 1999 23:58:00 -0000	[thread overview]
Message-ID: <199901142216.XAA13874@quatramaran.ens.fr> (raw)
In-Reply-To: <199901140044.TAA11843@jwlab.FEITH.COM>

In article < 199901140044.TAA11843@jwlab.FEITH.COM > you write:

>It's certainly worth considering having this type of thing controlled by
>-Os.  Many of the alignments done for performance result in an increase
>in size which may be undesirable in some situations.  BTW, in all fairness
>I would be surprised if the 27.5% space increase is representative of the
>total size change that the final executable experienced due to extra
>alignment.

In case you should care, I have a system on which such small differences
make a difference.

OpenBSD is considering switching to egcs 1.1.1 (or a later release :) )
from gcc 2.8.1.

The main stumbling block is that code output by egcs under -O2 on 
i386-aout is *larger* than code output by gcc 2.8.1.

Something like 30K for a 2MB kernel, which is somewhat large.

Part of it can be accounted for by stricter alignment issues (but not much
mind you).

Part of it can be traced to an embarrassing behavior of egcs, which tends
to leave stuff on the stack longer instead of using registers... same number
of cycles, larger code.

... plus some differing passes, since egcs has changed. The gcse seems to be
the main offender... -Os improved the code size, -fno-gcse improved it some
more, relaxing constant string alignment improved almost *nothing*.

If someone would be interested in helping me tracking down code differences,
I am very interested...

I already asked about this specific problem a few weeks ago, I've got next
to no feedback until now.

This is a real problem: for performance freaks that care only about C
code quality, it seems that at least on i386, egcs is a bad idea: code is
larger, and looking at assembler fragments does not indicate a trade-off
between code size and efficiency.

It may well be that I'm mistaken, or that I'm missing something obvious.
But until someone corrects me (or I find a solution myself), OpenBSD will
have to stay with gcc 2.8.1 (as much as I would like a change, personally).

  reply	other threads:[~1999-01-31 23:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-31 23:58 John Wehle
1999-01-31 23:58 ` Marc Espie [this message]
1999-01-31 23:58   ` Jeffrey A Law
1999-01-30 16:35     ` Marc Lehmann
1999-01-31 20:05       ` Jeffrey A Law
1999-02-01  8:07         ` Marc Lehmann
1999-02-28 22:53           ` Marc Lehmann
1999-01-31 23:58       ` Marc Lehmann
1999-01-31 23:58   ` David Edelsohn
1999-01-31 23:58     ` Joe Buck
1999-01-31 23:58       ` Gabriel Dos Reis
1999-01-31 23:58         ` Joe Buck
1999-01-31 23:58           ` Jeffrey A Law
1999-01-31 23:58   ` Joe Buck
1999-01-31 23:58     ` Marc Espie
  -- strict thread matches above, loose matches on Subject: below --
1999-02-01 17:28 N8TM
1999-02-28 22:53 ` N8TM
1999-01-31 23:58 John Wehle
1999-01-31 23:58 Zack Weinberg
1999-01-31 23:58 ` Alfred Perlstein
1999-01-31 23:58 ` Joern Rennecke
1999-01-31 23:58   ` Jeffrey A Law
1999-01-31 23:58     ` Peter Barada
1999-01-31 23:58       ` Marc Espie
1999-01-31 23:58       ` Nick Ing-Simmons
1999-01-31 23:58         ` Joern Rennecke
1999-01-31 23:58           ` John Vickers
1999-01-31 23:58             ` Joern Rennecke
1999-01-31 23:58       ` Zack Weinberg
1999-01-31 23:58         ` Jeffrey A Law
1999-01-31 23:58           ` Zack Weinberg
1999-01-31 23:58             ` Jeffrey A Law
1999-01-31 23:58     ` Joern Rennecke
1999-01-31 23:58       ` Jeffrey A Law
1999-01-31 23:58 N8TM
1999-01-31 23:58 ` Zack Weinberg
1999-01-31 23:58   ` Jeffrey A Law

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=199901142216.XAA13874@quatramaran.ens.fr \
    --to=espie@quatramaran.ens.fr \
    --cc=egcs@egcs.cygnus.com \
    --cc=john@feith.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).