From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10586 invoked by alias); 30 Apr 2011 16:17:56 -0000 Received: (qmail 10576 invoked by uid 22791); 30 Apr 2011 16:17:55 -0000 X-SWARE-Spam-Status: No, hits=-2.2 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-vx0-f175.google.com (HELO mail-vx0-f175.google.com) (209.85.220.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 Apr 2011 16:17:41 +0000 Received: by vxd7 with SMTP id 7so3973396vxd.20 for ; Sat, 30 Apr 2011 09:17:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.177.4 with SMTP id cm4mr8727548vdc.264.1304180260274; Sat, 30 Apr 2011 09:17:40 -0700 (PDT) Received: by 10.52.168.97 with HTTP; Sat, 30 Apr 2011 09:17:40 -0700 (PDT) In-Reply-To: <20110430105013.GA29869@kam.mff.cuni.cz> References: <20110427121610.GA1981@kam.mff.cuni.cz> <20110427144436.GB1981@kam.mff.cuni.cz> <20110428132735.GD1981@kam.mff.cuni.cz> <20110430105013.GA29869@kam.mff.cuni.cz> Date: Sat, 30 Apr 2011 16:38:00 -0000 Message-ID: Subject: Re: [RFC] Context sensitive inline analysis From: David Edelsohn To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org, mjambor@suse.cz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-04/txt/msg02415.txt.bz2 Honza, This patch appears to fix the failure on AIX: my build progressed past libstdc++. Thanks, David 2011/4/30 Jan Hubicka : >> On Thu, Apr 28, 2011 at 9:27 AM, Jan Hubicka wrote: >> >> Honza, >> >> >> >> I continue to receive an ICE: >> >> >> >> /farm/dje/src/src/libstdc++-v3/include/precompiled/stdc++.h:94:0: >> >> /tmp/20110427/powerpc-ibm-aix5.3.0.0/libstdc++-v3/include/valarray:11= 63:1: >> >> internal compiler error: vector VEC(tree,base) index domain error, in >> >> evaluate_conditions_for_edge at ipa-inline-analysis.c:537 >> >> >> >> I was able to bootstrap with GCC just prior to your patch on Friday. >> > Hi, >> > can I have a preprocessed testcase? The one attached to HP PR don't se= em >> > to reproduce for me. =A0Perhaps we just need a bounds check here thoug= h I think >> > we should catch all "evil" edges with can_inline_edge_p and never try = to propagate >> > across those. >> >> The failure currently occurs when building stdc++.h.gch with -O2. > > Duh, this sounds scary. > > I am attaching fix for the HP failure. Hopefully it will fix yours, too. > Reproducing gch ICE in cross would be more fun (and of course, GCH should= not > make difference, so it seems that we have some latent problem here too) >> >> Apparently this does not reproduce on PPC Linux using the original TOC >> model (cmodel=3Dsmall). =A0Note that GCC on AIX still defaults to 32 bit >> application and GCC on PPC Linux is 64 bit, so that might contribute >> to the difference. =A0Or the different process data layout of Linux vs >> AIX avoiding failure from memory corruption. > > The problem on HP is weird iteraction of ipa-cp, early inliner and constr= uctor > merging pass. =A0It needs !have_ctors/dtors target to reproduce and you r= eally > need to be lucky to get this happen. So I hope it is yours problem, too. = =A0At > least yours testcase looks almost identical to HP and works for me now, t= oo. > > Martin, this is an example why we probably shoudl update jump functions to > represent the program after ipa-cp transform. =A0In this case we simply c= onstruct > new direct call into the clone and that one gets misanalyzed. > > Bootstrapped/regtested x86_64-linux, comitted. > > =A0 =A0 =A0 =A0PR middle-end/48752 > =A0 =A0 =A0 =A0* ipa-inline.c (early_inliner): Disable when doing late > =A0 =A0 =A0 =A0addition of function. > Index: ipa-inline.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 > *** ipa-inline.c =A0 =A0 =A0 =A0(revision 173189) > --- ipa-inline.c =A0 =A0 =A0 =A0(working copy) > *************** early_inliner (void) > *** 1663,1668 **** > --- 1663,1676 ---- > =A0 =A0if (seen_error ()) > =A0 =A0 =A0return 0; > > + =A0 /* Do nothing if datastructures for ipa-inliner are already compute= d. =A0This happens when > + =A0 =A0 =A0some pass decides to construct new function and cgraph_add_n= ew_function calls lowering > + =A0 =A0 =A0passes and early optimization on it. =A0This may confuse our= self when early inliner decide > + =A0 =A0 =A0to inline call to function clone, because function clones do= n't have parameter list > + =A0 =A0 =A0in ipa-prop matching their signature. =A0*/ > + =A0 if (ipa_node_params_vector) > + =A0 =A0 return 0; > + > =A0#ifdef ENABLE_CHECKING > =A0 =A0verify_cgraph_node (node); > =A0#endif >