From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2652 invoked by alias); 25 Oct 2011 15:50:29 -0000 Received: (qmail 2643 invoked by uid 22791); 25 Oct 2011 15:50:27 -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 X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 15:50:11 +0000 Received: by qam2 with SMTP id 2so625715qam.20 for ; Tue, 25 Oct 2011 08:50:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.67.13 with SMTP id p13mr3548772qci.21.1319557810563; Tue, 25 Oct 2011 08:50:10 -0700 (PDT) Received: by 10.229.83.146 with HTTP; Tue, 25 Oct 2011 08:50:10 -0700 (PDT) In-Reply-To: <20111020122317.GA1489@kam.mff.cuni.cz> References: <20111019164149.GG18858@kam.mff.cuni.cz> <20111020122317.GA1489@kam.mff.cuni.cz> Date: Tue, 25 Oct 2011 16:47:00 -0000 Message-ID: Subject: Re: PR bootstrap/50709 (bootstrap miscompare) From: "H.J. Lu" 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-10/txt/msg02296.txt.bz2 On Thu, Oct 20, 2011 at 5:23 AM, Jan Hubicka wrote: >> @@ -1392,16 +1393,20 @@ inline_small_functions (void) >> =A0 =A0 =A0 =A0if (!edge->inline_failed) >> =A0 =A0 =A0 continue; >> >> - =A0 =A0 =A0/* Be sure that caches are maintained consistent. =A0*/ >> =A0#ifdef ENABLE_CHECKING >> + =A0 =A0 =A0/* Be sure that caches are maintained conservatively consis= tent. >> + =A0 =A0 =A0This means that cached badness is allways smaller or equal >> + =A0 =A0 =A0to the real badness. =A0*/ >> + =A0 =A0 =A0cached_badness =3D edge_badness (edge, false); >> +#endif >> =A0 =A0 =A0 =A0reset_edge_growth_cache (edge); >> =A0 =A0 =A0 =A0reset_node_growth_cache (edge->callee); >> -#endif >> >> =A0 =A0 =A0 =A0/* When updating the edge costs, we only decrease badness= in the keys. >> =A0 =A0 =A0 =A0Increases of badness are handled lazilly; when we see key= with out >> =A0 =A0 =A0 =A0of date value on it, we re-insert it now. =A0*/ >> =A0 =A0 =A0 =A0current_badness =3D edge_badness (edge, false); >> + =A0 =A0 =A0gcc_assert (cached_badness =3D=3D -1 || cached_badness <=3D= current_badness); > > This new check actually cathes a bug that is in tree since introduction o= f new > ipa-inline-analysis code. =A0The inliner assume that when it produce a ne= w inline > copy, the overall growth estimates for all callees can only degrade. =A0T= his is > not quite true: when a new knowledge is propagated, the callees might act= ually > become cheaper and reduce the growth. > > This patch takes the easy but expensive way to plug the problem by forcing > updating of all keys in the queue. =A0It increases LTO compile time of Mo= zilla to > 10 minutes, so I will need to develop better sollution. (the trick saving > recomputation was originally introduced to reduce copmile time particular= ly on > this testcase) Just I should not keep tree ICEing on many C++ sources unt= il I > am done. > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > > Index: ChangeLog > =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 > --- ChangeLog =A0 (revision 180247) > +++ ChangeLog =A0 (working copy) > @@ -1,5 +1,10 @@ > =A02011-10-19 =A0Jan Hubicka =A0 > > + =A0 =A0 =A0 * ipa-inline.c (inline_small_functions): Always update all = calles after > + =A0 =A0 =A0 inlining. > + > +2011-10-19 =A0Jan Hubicka =A0 > + > =A0 =A0 =A0 =A0PR bootstrap/50709 > =A0 =A0 =A0 =A0* ipa-inline.c (inline_small_functions): Fix checking code= to not make > =A0 =A0 =A0 =A0effect on fibheap stability. Those changes may have caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50868 --=20 H.J.