From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27839 invoked by alias); 5 Sep 2011 07:50:58 -0000 Received: (qmail 27827 invoked by uid 22791); 5 Sep 2011 07:50:57 -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,TW_CF X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Sep 2011 07:50:43 +0000 Received: by ywa12 with SMTP id 12so3188921ywa.20 for ; Mon, 05 Sep 2011 00:50:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.91.12 with SMTP id o12mr2560274ybb.337.1315209042406; Mon, 05 Sep 2011 00:50:42 -0700 (PDT) Received: by 10.151.84.14 with HTTP; Mon, 5 Sep 2011 00:50:42 -0700 (PDT) In-Reply-To: <20110905074111.GA18152@kam.mff.cuni.cz> References: <20110429211824.GA3820@kam.mff.cuni.cz> <201109021742.p82HgRvp032533@d06av02.portsmouth.uk.ibm.com> <20110903164131.GA6534@kam.mff.cuni.cz> <20110903193422.GB6534@kam.mff.cuni.cz> <20110905074111.GA18152@kam.mff.cuni.cz> Date: Mon, 05 Sep 2011 07:50:00 -0000 Message-ID: Subject: Re: Propagate BB predicates in ipa-inline-analysis From: Richard Guenther To: Jan Hubicka Cc: Ulrich Weigand , gcc-patches@gcc.gnu.org, arnd@arndb.de 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-09/txt/msg00266.txt.bz2 On Mon, Sep 5, 2011 at 9:41 AM, Jan Hubicka wrote: > Hi, > this is patch I comitted fixing ipa-inline-analysis. =A0Stil I guess we s= hould > fill in PR for missed optimization and solve the forwprop issue? I'm looking at it, it seems to be cfgcleanups bug Richard. > 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 178523) > --- ChangeLog =A0 (working copy) > *************** > *** 1,3 **** > --- 1,8 ---- > + 2011-09-04 =A0Jan Hubicka =A0 > + > + =A0 =A0 =A0 * ipa-inline-analysis.c (set_cond_stmt_execution_predicate)= : Check that > + =A0 =A0 =A0 parameter is SSA name. > + > =A02011-09-04 =A0Richard Guenther =A0 > > =A0 =A0 =A0 =A0Revert > Index: testsuite/gcc.c-torture/compile/20110902.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 > *** testsuite/gcc.c-torture/compile/20110902.c =A0(revision 0) > --- testsuite/gcc.c-torture/compile/20110902.c =A0(revision 0) > *************** > *** 0 **** > --- 1,14 ---- > + static inline __attribute__((always_inline)) int f (unsigned int n, uns= igned int size) > + { > + =A0return (__builtin_constant_p (size !=3D 0 && n > ~0 / size) > + =A0 =A0 =A0 =A0 =A0? !!(size !=3D 0 && n > ~0 / size) > + =A0 =A0 =A0 =A0 =A0: ({ static unsigned int count[2] =3D { 0, 0 }; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 int r =3D !!(size !=3D 0 && n > ~0 / size); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 count[r]++; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 r; })); > + } > + > + int g (unsigned int size) > + { > + =A0return f (size / 4096, 4); > + } > Index: testsuite/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 > *** testsuite/ChangeLog (revision 178523) > --- testsuite/ChangeLog (working copy) > *************** > *** 1,3 **** > --- 1,7 ---- > + 2011-09-04 =A0Jan Hubicka =A0 > + > + =A0 =A0 =A0 * gcc.c-torture/compile/20110902.c: new testcase. > + > =A02011-09-04 =A0Jason Merrill =A0 > > =A0 =A0 =A0 =A0PR c++/49267 > Index: ipa-inline-analysis.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-analysis.c =A0 =A0 =A0 (revision 178523) > --- ipa-inline-analysis.c =A0 =A0 =A0 (working copy) > *************** set_cond_stmt_execution_predicate (struc > *** 1187,1192 **** > --- 1187,1194 ---- > =A0 =A0 =A0 =A0|| gimple_call_num_args (set_stmt) !=3D 1) > =A0 =A0 =A0return; > =A0 =A0op2 =3D gimple_call_arg (set_stmt, 0); > + =A0 if (TREE_CODE (op2) !=3D SSA_NAME) > + =A0 =A0 return; > =A0 =A0if (!SSA_NAME_IS_DEFAULT_DEF (op2)) > =A0 =A0 =A0return; > =A0 =A0index =3D ipa_get_param_decl_index (info, SSA_NAME_VAR (op2)); >