public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: Stan Shebs <shebs@apple.com>
Cc: Aldy Hernandez <aldyh@redhat.com>, Mike Stump <mrs@apple.com>,
	<gcc@gcc.gnu.org>
Subject: Re: Faster compilation speed
Date: Fri, 09 Aug 2002 17:36:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0208092018340.4824-100000@dberlin.org> (raw)
In-Reply-To: <3D544F62.80205@apple.com>

On Fri, 9 Aug 2002, Stan Shebs wrote:

> Aldy Hernandez wrote:
> 
> >>Let's take my combine elision patch.  This patch makes the compiler 
> >>generate worse code.  The way in which it is worse, is that more stack 
> >>space is used.  How much more, well, my initial guess is that it is 
> >>less than 10% worse.  Not too bad.  Maybe users would care, maybe they 
> >>
> >
> >I assume you have already looked at the horrendity of the code
> >presently generated by -O0.  It's pretty unusable as it is.  Who would
> >really want to use gcc under the influence of "worse than -O0"?
> >Really.
> >
> OK, then to really rub it in, CW runs much faster than GCC, even on
> that slow Darwin OS :-), and that's with its non-optimizing case being
> about halfway between GCC's -O0 and -O1, and works well with the
> debugger still.
> 
> Sacrificing -O0 optimization is just a desperation move, since
> we don't seem to have many other ideas about how to make GCC as
> fast as CW.

Look, there are, in reality, two things that make our compiler slower 
than metrowerks, even at -O0

First is parsing.
The bison parser is just not fast. It never will be.
Period.

The second is expansion from tree to RTL.
It's not fast either.  The timings don't always tell the real story. There 
are cases where expansion is occuring when the timevar isn't pushed (IE 
other things that call expand_*, where * = anything but _body, where the 
timevar is pushed).

The solutions to the first is already in progress (give me a clean, 
working hand-written parser, that can compile libstdc++, and i'll happily make it 
go real fast.  I was just starting to when the branch was abandoned.).

Codewarrior, for comparison sake, uses a backtracking recursive descent 
parser for it's C++ compiler.

The second is hard to solve in a way people would like.  The fastest way 
to solve the problem is to do native code generation off the tree at -O0, 
avoiding any optimizations whatsoever.

This is, of course, not easy to do with our current MD files.
We really would need a *burg like tool and associated descriptions.
You could do debugging output without too much difficulty. Most of the 
debug_* functions operate on trees anyway.

PFE solves our first problem as well, but not the second one.  We still 
have to *generate* the code.

But there still have to be better answers than trying to avoid the backend 
entirely.  If our backend is so godawfully bad that we have to start 
skipping entire "normal" phases (IE not  optimizations to speed up code, 
or things that are done in plenty of other compilers at -O0), then we 
really *do* need to rearchitect them, and maybe more.
Not just directed speed ups.
At some point, it becomes easier to redo it from scratch well.
Particularly when nobody today understands why anyone thought it was a 
good idea to do it the way it's done now.

 --Dan




> 
> Stan
> 
> 
> 
> 

  parent reply	other threads:[~2002-08-09 17:36 UTC|newest]

Thread overview: 256+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-09 12:17 Mike Stump
2002-08-09 13:04 ` Noel Yap
2002-08-09 13:10   ` Matt Austern
2002-08-09 14:22   ` Neil Booth
2002-08-09 14:44     ` Noel Yap
2002-08-09 15:14       ` Neil Booth
2002-08-10 15:54         ` Noel Yap
2002-08-09 15:13   ` Stan Shebs
2002-08-09 15:18     ` Neil Booth
2002-08-10 16:12       ` Noel Yap
2002-08-10 18:00         ` Nix
2002-08-10 20:36           ` Noel Yap
2002-08-11  4:30             ` Nix
2002-08-12 15:08           ` Mike Stump
2002-08-09 15:19     ` Ziemowit Laski
2002-08-09 15:25       ` Neil Booth
2002-08-10 16:16       ` Noel Yap
2002-08-10 16:07     ` Noel Yap
2002-08-10 16:18       ` Neil Booth
2002-08-10 20:27         ` Noel Yap
2002-08-11  0:11           ` Neil Booth
2002-08-12 12:04             ` Devang Patel
2002-08-09 18:57   ` Linus Torvalds
2002-08-09 19:12     ` Phil Edwards
2002-08-09 19:34     ` Kevin Atkinson
2002-08-09 20:28       ` Linus Torvalds
2002-08-09 21:12         ` Daniel Berlin
2002-08-09 21:52           ` Linus Torvalds
2002-08-10  6:32         ` Robert Lipe
2002-08-10 14:26           ` Cyrille Chepelov
2002-08-10 17:33             ` Daniel Berlin
2002-08-10 18:21               ` Linus Torvalds
2002-08-10 18:38                 ` Daniel Berlin
2002-08-10 18:39                 ` Cyrille Chepelov
2002-08-10 18:28               ` Cyrille Chepelov
2002-08-10 18:30                 ` John Levon
2002-08-11  1:03             ` Florian Weimer
2002-08-10 19:20     ` Noel Yap
2002-08-09 13:10 ` Aldy Hernandez
2002-08-09 15:28   ` Mike Stump
2002-08-09 16:00     ` Aldy Hernandez
2002-08-09 16:26       ` Stan Shebs
2002-08-09 16:31         ` Aldy Hernandez
2002-08-09 16:51           ` Stan Shebs
2002-08-09 16:54             ` Aldy Hernandez
2002-08-09 17:44             ` Daniel Berlin
2002-08-09 18:35               ` David S. Miller
2002-08-09 18:39                 ` Aldy Hernandez
2002-08-09 18:59                   ` David S. Miller
2002-08-09 20:01                   ` Per Bothner
2002-08-09 18:25             ` David S. Miller
2002-08-13  0:50               ` Loren James Rittle
2002-08-13 21:46                 ` Fergus Henderson
2002-08-13 22:40                   ` David S. Miller
2002-08-13 23:44                     ` Fergus Henderson
2002-08-14  7:58                     ` Jeff Sturm
2002-08-14  9:52                     ` Richard Henderson
2002-08-14 10:00                       ` David Edelsohn
2002-08-14 12:01                         ` Andreas Schwab
2002-08-14 12:07                           ` David Edelsohn
2002-08-14 13:20                             ` Michael Matz
2002-08-14 16:31                               ` Faster compilation speed [zone allocation] Per Bothner
2002-08-15 11:34                                 ` Aldy Hernandez
2002-08-15 11:39                                   ` David Edelsohn
2002-08-15 12:01                                     ` Lynn Winebarger
2002-08-15 12:11                                       ` David Edelsohn
2002-08-15 11:41                                   ` Michael Matz
2002-08-16  8:44                                     ` Kai Henningsen
2002-08-15 11:43                                   ` Per Bothner
2002-08-15 11:57                                   ` Kevin Handy
2002-08-14 13:20                             ` Faster compilation speed Jamie Lokier
2002-08-14 16:01                               ` Nix
2002-08-14 10:15                       ` David Edelsohn
2002-08-14 16:35                         ` Richard Henderson
2002-08-14 17:02                           ` David Edelsohn
2002-08-20  4:15                         ` Richard Earnshaw
2002-08-20  5:38                           ` Jeff Sturm
2002-08-20  5:53                             ` Richard Earnshaw
2002-08-20 13:42                               ` Jeff Sturm
2002-08-22  1:55                                 ` Richard Earnshaw
2002-08-22  2:03                                   ` David S. Miller
2002-08-23 15:39                                   ` Jeff Sturm
2002-08-20  8:00                           ` David Edelsohn
2002-08-14  7:36                   ` Jeff Sturm
2002-08-10 10:02             ` Neil Booth
2002-08-09 17:36         ` Daniel Berlin [this message]
2002-08-12 16:23         ` Mike Stump
2002-08-12 16:05       ` Mike Stump
2002-08-09 19:07     ` David Edelsohn
2002-08-09 14:29 ` Neil Booth
2002-08-09 15:02   ` Nathan Sidwell
2002-08-09 17:05     ` Stan Shebs
2002-08-10  2:21     ` Gabriel Dos Reis
2002-08-12 12:11   ` Mike Stump
2002-08-12 12:41     ` David Edelsohn
2002-08-12 12:47       ` Matt Austern
2002-08-12 12:56         ` David S. Miller
2002-08-12 13:56           ` Matt Austern
2002-08-12 14:27             ` Daniel Berlin
2002-08-12 15:26               ` David Edelsohn
2002-08-13 10:49                 ` David Edelsohn
2002-08-13 10:52                   ` David S. Miller
2002-08-13 14:03                   ` David Edelsohn
2002-08-13 14:46                     ` Geoff Keating
2002-08-13 15:10                       ` David Edelsohn
2002-08-13 15:26                         ` Neil Booth
2002-08-14  9:25                     ` Kevin Handy
2002-08-18 12:58                     ` Jeff Sturm
2002-08-19 12:55                       ` Mike Stump
2002-08-20 11:22                       ` Will Cohen
2002-08-13 15:32                   ` Daniel Berlin
2002-08-13 15:58                     ` David Edelsohn
2002-08-13 16:49                       ` David S. Miller
2002-08-12 14:59             ` David S. Miller
2002-08-12 16:00             ` Geoff Keating
2002-08-13  2:58               ` Nick Ing-Simmons
2002-08-13 10:47               ` Richard Henderson
2002-08-12 14:28           ` Stan Shebs
2002-08-12 15:05             ` David S. Miller
2002-08-12 19:17     ` Mike Stump
2002-08-12 23:28       ` Neil Booth
2002-08-09 14:51 ` Stan Shebs
2002-08-09 15:03   ` David Edelsohn
2002-08-09 15:43     ` Stan Shebs
2002-08-09 16:43     ` Alan Lehotsky
2002-08-09 16:49       ` Matt Austern
2002-08-10  2:24         ` Gabriel Dos Reis
2002-08-09 15:26   ` Geoff Keating
2002-08-09 16:06     ` Stan Shebs
2002-08-09 16:14       ` Terry Flannery
2002-08-09 16:29         ` Neil Booth
2002-08-09 16:29       ` Phil Edwards
2002-08-12 16:24         ` Mike Stump
2002-08-12 18:38           ` Phil Edwards
2002-08-13  5:27           ` Theodore Papadopoulo
2002-08-13 10:03             ` Mike Stump
2002-08-12 15:55     ` Mike Stump
2002-08-09 14:59 ` Timothy J. Wood
2002-08-16 13:31   ` Problem with PFE approach [Was: Faster compilation speed] Timothy J. Wood
2002-08-16 13:44     ` Devang Patel
2002-08-16 14:31       ` Timothy J. Wood
2002-08-16 14:39         ` Neil Booth
2002-08-16 14:46         ` Devang Patel
2002-08-16 13:54     ` Devang Patel
2002-08-16 14:42       ` Neil Booth
2002-08-16 14:57         ` Devang Patel
2002-08-17 15:31           ` Timothy J. Wood
2002-08-17 20:04             ` Daniel Berlin
2002-08-17 20:07               ` Andrew Pinski
2002-08-17 20:14               ` Timothy J. Wood
2002-08-17 20:21                 ` Daniel Berlin
2002-08-18  3:17                   ` Kai Henningsen
2002-08-18  7:36                     ` Daniel Berlin
2002-08-18 11:20                       ` jepler
2002-08-18 13:20                         ` Daniel Berlin
2002-08-18 14:31                           ` Timothy J. Wood
2002-08-18 14:35                             ` Andrew Pinski
2002-08-18 14:55                               ` Timothy J. Wood
2002-08-19  2:41                             ` Michael Matz
2002-08-19  6:26                               ` jepler
2002-08-19  6:40                                 ` Daniel Berlin
2002-08-19 11:50                                 ` Devang Patel
2002-08-19 12:55                                   ` Jeff Epler
2002-08-19 13:03                                     ` Ziemowit Laski
2002-08-19 11:53                               ` Devang Patel
2002-08-19 11:59                 ` Devang Patel
2002-08-17 20:15             ` Daniel Berlin
2002-08-19  7:07             ` Stan Shebs
2002-08-19  8:52               ` Timothy J. Wood
2002-08-16 14:45       ` Timothy J. Wood
2002-08-09 16:01 ` Faster compilation speed Richard Henderson
2002-08-10 17:48 ` Aaron Lehmann
2002-08-12 10:36   ` Dale Johannesen
2002-08-09 19:45 Robert Dewar
2002-08-09 20:24 ` Daniel Berlin
2002-08-10  4:35 Robert Dewar
2002-08-10  9:45 ` Linus Torvalds
2002-08-10 10:24   ` David Edelsohn
2002-08-10  4:38 Robert Dewar
2002-08-10  9:47 ` Linus Torvalds
2002-08-10  9:52 Richard Kenner
2002-08-10 10:41 ` Linus Torvalds
2002-08-10 10:43 Robert Dewar
2002-08-10 11:02 ` Linus Torvalds
2002-08-10 10:45 Robert Dewar
2002-08-10 13:26 ` Gianni Mariani
2002-08-10 10:47 Richard Kenner
2002-08-10 11:17 ` Linus Torvalds
2002-08-12 23:33   ` Kai Henningsen
2002-08-10 10:52 Richard Kenner
2002-08-10 10:55 Robert Dewar
2002-08-10 10:56 Robert Dewar
2002-08-10 11:51 Robert Dewar
2002-08-10 13:47 Robert Dewar
2002-08-12 14:10 Morten Welinder
2002-08-12 15:01 ` David S. Miller
2002-08-12 15:21 Robert Dewar
2002-08-12 15:25 ` David S. Miller
2002-08-13 13:46   ` Kai Henningsen
2002-08-12 23:39 Tim Josling
2002-08-13  8:07 Robert Dewar
2002-08-13  8:40 ` Daniel Jacobowitz
2002-08-13  9:10 Robert Dewar
2002-08-13 10:20 ` Theodore Papadopoulo
2002-08-13 21:44   ` Fergus Henderson
2002-08-14  4:00     ` Noel Yap
2002-08-14  4:36       ` Michael Matz
2002-08-14  4:45         ` Noel Yap
2002-08-14 10:06           ` Janis Johnson
2002-08-19  4:58     ` Nick Ing-Simmons
2002-08-13 10:50 ` Matt Austern
2002-08-13 11:53 ` Stan Shebs
2002-08-13 14:53   ` Joe Buck
2002-08-13 10:08 Robert Dewar
2002-08-13 10:36 Robert Dewar
2002-08-13 13:46 ` Kai Henningsen
2002-08-13 16:53 ` Joe Buck
2002-08-13 17:24   ` Paul Koning
2002-08-13 12:02 Robert Dewar
2002-08-13 12:32 ` Robert Lipe
2002-08-13 12:45   ` Gabriel Dos Reis
2002-08-14  2:55 ` Daniel Egger
2002-08-13 12:49 Robert Dewar
2002-08-14 10:17 ` Dale Johannesen
2002-08-14 10:56   ` David S. Miller
2002-08-14 11:04     ` Dale Johannesen
2002-08-14 11:08       ` David S. Miller
2002-08-19  5:15     ` Nick Ing-Simmons
2002-08-19  7:06       ` David S. Miller
2002-08-19 10:29         ` Richard Henderson
2002-08-19 11:33           ` David S. Miller
2002-08-19  9:20       ` Daniel Egger
2002-08-14 11:27   ` Timothy J. Wood
2002-08-14 11:42     ` David S. Miller
2002-08-14 13:13       ` Jamie Lokier
2002-08-19  5:20         ` Nick Ing-Simmons
2002-08-14 13:16     ` Jamie Lokier
2002-08-14 13:29       ` Timothy J. Wood
2002-08-14 13:35         ` Jamie Lokier
2002-08-14 13:43           ` Tim Hollebeek
2002-08-14 13:57             ` Jamie Lokier
2002-08-13 15:00 Tim Josling
2002-08-13 15:48 ` Russ Allbery
2002-08-14 19:11 Tim Josling
     [not found] <1029475232.9572.ezmlm@gcc.gnu.org>
2002-08-16  1:28 ` Mat Hounsell
2002-08-16  5:08 Joe Wilson
2002-08-16  5:51 ` Noel Yap
2002-08-16 11:04 ` Mike Stump
     [not found] <1029519609.8400.ezmlm@gcc.gnu.org>
2002-08-17 22:23 ` Mat Hounsell
2002-08-18  6:27   ` Michael S. Zick
2002-08-20 14:11 Tim Josling
2002-08-20 14:13 ` David S. Miller
2002-08-20 14:43 ` Stan Shebs
2002-08-21  6:59 Richard Kenner
2002-08-21 15:04 ` David S. Miller
2002-08-21 15:35 Tim Josling

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=Pine.LNX.4.44.0208092018340.4824-100000@dberlin.org \
    --to=dberlin@dberlin.org \
    --cc=aldyh@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mrs@apple.com \
    --cc=shebs@apple.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).