public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: okellogg@users.sourceforge.net
Cc: Geert Bosch <bosch@adacore.com>, gcc@gcc.gnu.org
Subject: Re: [gnat] reuse of ASTs already constructed
Date: Mon, 27 Apr 2009 19:47:00 -0000	[thread overview]
Message-ID: <m3vdoqj6xx.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1240752645.5074.102.camel@tidbit.site> (Oliver Kellogg's message of "Sun\, 26 Apr 2009 15\:30\:44 +0200")

>>>>> "Oliver" == Oliver Kellogg <oliver.kellogg@t-online.de> writes:

Oliver> First tests look very promising. I'm getting noticeable speedups
Oliver> of when supplying N interrelated bodies in a single call as opposed
Oliver> to N individual calls to gnat1. Precise measurements will follow.

This sounds like it has a lot of overlap with the incremental compiler
project I was working on.  I think you could probably rearrange things
to use the compile server infrastructure from the branch without
trouble.

There are some differences in invocation.  I designed the incremental
compiler so that no changes to user Makefiles would be needed; I don't
know whether that is a consideration with Ada.

I think the compile server infrastructure is in decent shape, though I
haven't worked on it in a while, so it is a bit hard to remember
exactly.  The difficult bit is converting a front end to be
server-ready; but from your note it sounds like you have already done
that.

Oliver> It's not totally functioning yet:
Oliver> 1) invocation of "as" (assembler) is only done for the first file

This is solved on the branch.  There, the server starts the assembler
from compile_file.

Oliver> 2) gcc is passing too many switches to the compiler, for example
Oliver> "-o" (output file) should be suppressed when in multi-source mode.

With the compile server you don't have to worry about this kind of
thing.  I changed the options processing code to be re-initializable;
each compiler job in the server runs with its own set of options.

Oliver> * toplev.c:
Oliver> 1) Had to make realloc_for_line_map() global because when repeatedly
Oliver> calling linemap_init(), the member "reallocator" is NULL and I
Oliver> couldn't find a way of setting it to the proper value again.

I suggest a new public function in toplev.c that creates a line table.
I did something similar to this on the incremental branch; except
there I did not have to make it public, since server re-initialization
is done in toplev.c.

I am curious how you handle locations on shared bits of the AST.
I needed some disturbing hacks to make this work well for C.

Oliver> * cgraph.{h,c}, cgraphunit.c:
Oliver> Added many missing reinitializations that are necessary when calling
Oliver> compile_file() repeatedly.

I did this on the branch too.  I needed similar changes in dwarf2out
that you might be interested in.  I also changed things so that debug
output starts "late", but offhand I don't recall whether that is only
relevant to the server case.

Tom

  parent reply	other threads:[~2009-04-27 18:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 16:30 Oliver Kellogg
2009-04-14 14:10 ` Oliver Kellogg
2009-04-19 18:48 ` Oliver Kellogg
2009-04-20  5:14   ` Oliver Kellogg
2009-05-03 21:14     ` Oliver Kellogg
2009-05-03 21:17       ` Robert Dewar
2009-05-03 21:22         ` Oliver Kellogg
2009-05-04  1:14           ` Robert Dewar
2009-05-04  5:31             ` Oliver Kellogg
2009-05-04 12:23               ` Dave Korn
2009-05-09 20:09               ` Oliver Kellogg
2009-05-09 20:42                 ` Robert Dewar
2009-06-15 20:38                   ` Oliver Kellogg
2009-06-17  4:20                     ` Oliver Kellogg
2009-06-28 22:45                   ` Oliver Kellogg
2009-05-08 21:13       ` Tom Tromey
2009-04-20 18:40 ` Geert Bosch
2009-04-20 20:34   ` Oliver Kellogg
2009-04-20 21:12     ` Geert Bosch
2009-04-20 21:35       ` Oliver Kellogg
2009-04-27  6:18       ` Oliver Kellogg
2009-04-27  8:29         ` Robert Dewar
2009-04-27 18:36         ` Ian Lance Taylor
2009-04-27 18:47           ` Oliver Kellogg
2009-04-27 19:47         ` Tom Tromey [this message]
2009-04-27 22:09           ` Oliver Kellogg
2009-04-27 22:26             ` Tom Tromey
2009-04-27 22:44               ` Oliver Kellogg
  -- strict thread matches above, loose matches on Subject: below --
2012-07-07 20:33 Oliver Kellogg
2012-06-23 18:22 Oliver Kellogg
2012-06-23 22:23 ` Arnaud Charlet
2012-06-17 15:12 Oliver Kellogg
2012-04-15 19:22 oliver.kellogg
2012-04-06 20:24 oliver.kellogg
2012-04-10 10:20 ` Arnaud Charlet
     [not found] <1240349826.4554.76.camel@tidbit.site>
     [not found] ` <49EE4D58.8020404@adacore.com>
     [not found]   ` <1240437226.4554.101.camel@tidbit.site>
     [not found]     ` <49EF9892.1010703@adacore.com>
     [not found]       ` <1246487007.4507.76.camel@tidbit.site>
2009-08-26 18:39         ` Oliver Kellogg
2009-09-27 22:48           ` Oliver Kellogg
2003-03-04 22:03 Robert Dewar
2003-03-04 20:42 Robert Dewar
2003-03-04 21:01 ` Oliver Kellogg
2003-03-04 22:03   ` Geert Bosch
2003-03-04 17:08 Oliver Kellogg
2003-03-04 20:07 ` Geert Bosch
2003-03-04 20:49   ` Oliver Kellogg

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=m3vdoqj6xx.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=bosch@adacore.com \
    --cc=gcc@gcc.gnu.org \
    --cc=okellogg@users.sourceforge.net \
    /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).