public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Diego Novillo <dnovillo@google.com>
To: gcc@gnu.org
Cc: Richard Guenther <rguenther@suse.de>, Jan Hubicka <jh@suse.cz>,
	       Lawrence Crowl <crowl@google.com>
Subject: [pph] Adapting LTO streaming for front end AST saving
Date: Wed, 23 Mar 2011 14:47:00 -0000	[thread overview]
Message-ID: <AANLkTinugLjjKuuttXFujnBnJNp4V-UBD-VtzvNULkMV@mail.gmail.com> (raw)

Over at the PPH branch we are starting to re-use the LTO streaming
routines to save front end trees.  Clearly, there are things that need
to be extended and/or replaced since LTO streaming assumes that we are
in GIMPLE.  However, there is a large intersection that I think can be
commoned out.

- ASTs do not need to concern themselves with language differences.
They are generated and consumed by cc1plus, so saving
language-dependent information is fine.
- LTO streaming has several checks and assumptions that prevent
non-gimple trees (e.g., DECL_SAVED_TREE must be NULL).

I'm looking for opinions on what would be the best approach to factor
out the common code.  So far, I have created a layer of routines and
data structures that the front end calls to manipulate PPH files.
These are wrappers on top of LTO streaming that deal with all the
sections, buffers and streams used by LTO.

I was thinking of using langhooks to do things like checks (like the
check for DECL_SAVED_TREE in
lto_output_ts_decl_non_common_tree_pointers or the asserts in
lto_get_common_nodes).  I'm expecting that there will be other things,
like handling more tree nodes in the tree streaming routines.  But
everything else seems to be already sufficiently flexible for our
needs.

Thoughts?


Thanks.  Diego.

             reply	other threads:[~2011-03-23 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 14:47 Diego Novillo [this message]
2011-03-23 14:53 ` Richard Guenther
2011-03-23 15:11   ` Diego Novillo
2011-03-23 16:39   ` Jan Hubicka
2011-03-23 16:49     ` Diego Novillo
2011-03-23 17:58       ` Diego Novillo

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=AANLkTinugLjjKuuttXFujnBnJNp4V-UBD-VtzvNULkMV@mail.gmail.com \
    --to=dnovillo@google.com \
    --cc=crowl@google.com \
    --cc=gcc@gnu.org \
    --cc=jh@suse.cz \
    --cc=rguenther@suse.de \
    /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).