From: Richard Guenther <richard.guenther@gmail.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: Diego Novillo <dnovillo@google.com>,
gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org
Subject: Re: [PATCH] split tree_type, a.k.a. "tuplifying types"
Date: Wed, 11 May 2011 10:01:00 -0000 [thread overview]
Message-ID: <BANLkTikFfr_uB9w2PPV2grmeRQZN2fJPKg@mail.gmail.com> (raw)
In-Reply-To: <20110510175015.GY23480@codesourcery.com>
On Tue, May 10, 2011 at 7:50 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Tue, May 10, 2011 at 02:28:06PM -0300, Diego Novillo wrote:
>> On Tue, May 10, 2011 at 13:15, Nathan Froyd <froydnj@codesourcery.com> wrote:
>> > Other types can of course be shrunk, but the memory savings from doing
>> > so will be negligible
>>
>> Have you done any measurements on the potential savings?
>
> Only back-of-the-envelope. I will try to get some numbers after we
> start saving memory. :)
>
>> > +static void
>> > +lto_input_ts_type_common_tree_pointers (struct lto_input_block *ib,
>> > + struct data_in *data_in, tree expr)
>> > +{
>> > + TYPE_SIZE (expr) = lto_input_tree (ib, data_in);
>> > + TYPE_SIZE_UNIT (expr) = lto_input_tree (ib, data_in);
>> > + TYPE_ATTRIBUTES (expr) = lto_input_tree (ib, data_in);
>> > + TYPE_NAME (expr) = lto_input_tree (ib, data_in);
>> > + /* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO. */
>>
>> Add some wording as to why not? This was copied from existing
>> comments, but I do not remember why we were doing this. Not too
>> critical, anyway.
>
> I'm not entirely sure; I'm not intimately familiar with how LTO
> streaming works. lto.c's lto_ft_type and lto_ft_common purport to
> recreate TYPE_{POINTER,REFERENCE}_TO, but I don't immediately see how
> that's supposed to work. I can imagine that we ought to be able to
> recreate those fields after reading everything in, and that's why don't
> stream them; I just don't know where that's done.
Yes, we're re-creating them to avoid streaming all pointer types that might
be unused before streaming.
One nit:
+struct GTY(()) tree_type_non_common {
+ struct tree_type_with_lang_specific common;
shouldn't that field be named w_lang_specific or something like that,
instead of re-using common?
Richard.
> -Nathan
>
next prev parent reply other threads:[~2011-05-11 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 17:16 Nathan Froyd
2011-05-10 18:32 ` Mike Stump
2011-05-10 19:26 ` Diego Novillo
2011-05-10 19:28 ` Nathan Froyd
2011-05-11 4:03 ` Michael Matz
2011-05-11 10:01 ` Richard Guenther [this message]
2011-05-10 21:13 ` Tom Tromey
2011-05-12 9:32 ` Jason Merrill
2011-05-22 20:22 ` Tom de Vries
2011-05-23 15:52 ` Nathan Froyd
2011-05-24 15:03 ` Tom de Vries
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=BANLkTikFfr_uB9w2PPV2grmeRQZN2fJPKg@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=dnovillo@google.com \
--cc=froydnj@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=java-patches@gcc.gnu.org \
/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).