From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28834 invoked by alias); 14 Jun 2011 10:05:15 -0000 Received: (qmail 28825 invoked by uid 22791); 14 Jun 2011 10:05:14 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Jun 2011 10:05:01 +0000 Received: by wye20 with SMTP id 20so4492288wye.20 for ; Tue, 14 Jun 2011 03:05:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.205.202 with SMTP id fr10mr6086598wbb.60.1308045899962; Tue, 14 Jun 2011 03:04:59 -0700 (PDT) Received: by 10.227.28.69 with HTTP; Tue, 14 Jun 2011 03:04:59 -0700 (PDT) In-Reply-To: <20110613125412.GC11211@kam.mff.cuni.cz> References: <20110613125412.GC11211@kam.mff.cuni.cz> Date: Tue, 14 Jun 2011 10:14:00 -0000 Message-ID: Subject: Re: Do not stream BINFO_VIRTUALs to ltrans unit From: Richard Guenther To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg01026.txt.bz2 On Mon, Jun 13, 2011 at 2:54 PM, Jan Hubicka 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 > =A0 =A0 =A0 =A0* lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): = Do not > =A0 =A0 =A0 =A0stream BINFO_VIRTUALS to ltrans units. > Index: lto-streamer-out.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lto-streamer-out.c =A0(revision 174985) > +++ lto-streamer-out.c =A0(working copy) > @@ -1117,7 +1117,11 @@ > > =A0 lto_output_tree_or_ref (ob, BINFO_OFFSET (expr), ref_p); > =A0 lto_output_tree_or_ref (ob, BINFO_VTABLE (expr), ref_p); > - =A0lto_output_tree_or_ref (ob, BINFO_VIRTUALS (expr), ref_p); > + =A0/* BINFO_VIRTUALS is used to drive type based devirtualizatoin. =A0I= t often links > + =A0 =A0 together large portions of programs making it harder to partiti= on. =A0Becuase > + =A0 =A0 devirtualization is interesting before inlining, only, there is= no real > + =A0 =A0 need to ship it into ltrans partition. =A0*/ > + =A0lto_output_tree_or_ref (ob, flag_wpa ? NULL : BINFO_VIRTUALS (expr),= ref_p); > =A0 lto_output_tree_or_ref (ob, BINFO_VPTR_FIELD (expr), ref_p); > > =A0 output_uleb128 (ob, VEC_length (tree, BINFO_BASE_ACCESSES (expr))); >