From: Richard Guenther <richard.guenther@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Do not stream BINFO_VIRTUALs to ltrans unit
Date: Tue, 14 Jun 2011 10:14:00 -0000 [thread overview]
Message-ID: <BANLkTimtZjTS3phCpkRcA4di_irGYqXRgA@mail.gmail.com> (raw)
In-Reply-To: <20110613125412.GC11211@kam.mff.cuni.cz>
On Mon, Jun 13, 2011 at 2:54 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> by accident I noticed that BINFO_VIRTUALs streaming is really expensive. It
> about doubles amount of IL and types streamed by Mozilla.
>
> One obvious optimization is to not stream into ltrans unit where it is
> too late to do any useful devirtualization anyway.
> Doing so reduces /tmp usage from 1.7GB to 1.1GB and proportionaly reduces
> streaming out time.
>
> Bootstrapped/regtested x86_64-linux.
> OK?
Ok.
Thanks,
Richard.
> Honza
> * lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not
> stream BINFO_VIRTUALS to ltrans units.
> Index: lto-streamer-out.c
> ===================================================================
> --- lto-streamer-out.c (revision 174985)
> +++ lto-streamer-out.c (working copy)
> @@ -1117,7 +1117,11 @@
>
> lto_output_tree_or_ref (ob, BINFO_OFFSET (expr), ref_p);
> lto_output_tree_or_ref (ob, BINFO_VTABLE (expr), ref_p);
> - lto_output_tree_or_ref (ob, BINFO_VIRTUALS (expr), ref_p);
> + /* BINFO_VIRTUALS is used to drive type based devirtualizatoin. It often links
> + together large portions of programs making it harder to partition. Becuase
> + devirtualization is interesting before inlining, only, there is no real
> + need to ship it into ltrans partition. */
> + lto_output_tree_or_ref (ob, flag_wpa ? NULL : BINFO_VIRTUALS (expr), ref_p);
> lto_output_tree_or_ref (ob, BINFO_VPTR_FIELD (expr), ref_p);
>
> output_uleb128 (ob, VEC_length (tree, BINFO_BASE_ACCESSES (expr)));
>
prev parent reply other threads:[~2011-06-14 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 13:11 Jan Hubicka
2011-06-14 10:14 ` Richard Guenther [this message]
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=BANLkTimtZjTS3phCpkRcA4di_irGYqXRgA@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/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).