From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6139 invoked by alias); 9 Jul 2010 16:43:17 -0000 Received: (qmail 6130 invoked by uid 22791); 9 Jul 2010 16:43:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Jul 2010 16:43:12 +0000 Received: by vws3 with SMTP id 3so2669735vws.20 for ; Fri, 09 Jul 2010 09:43:10 -0700 (PDT) Received: by 10.224.67.193 with SMTP id s1mr4768723qai.28.1278693790505; Fri, 09 Jul 2010 09:43:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.29.9 with HTTP; Fri, 9 Jul 2010 09:42:40 -0700 (PDT) In-Reply-To: References: <1278625285-12667-1-git-send-email-sebpop@gmail.com> <1278625285-12667-3-git-send-email-sebpop@gmail.com> From: Sebastian Pop Date: Fri, 09 Jul 2010 16:43:00 -0000 Message-ID: Subject: Re: [PATCH 2/4] Outline fold_or_predicates from add_to_predicate_list. To: Richard Guenther Cc: gcc-patches@gcc.gnu.org, matz@suse.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: 2010-07/txt/msg00800.txt.bz2 On Fri, Jul 9, 2010 at 07:12, Richard Guenther wrote: > On Thu, 8 Jul 2010, Sebastian Pop wrote: > >> =A0 =A0 =A0 * tree-if-conv.c (fold_or_predicates): New. >> =A0 =A0 =A0 (add_to_predicate_list): Call it. > > I requested this change before the previous patch was checked in. No, you did not request this change. > Please do not ignore reviews this way. =A0Thanks. I do not ignore reviews. > >> --- >> =A0gcc/tree-if-conv.c | =A0 43 ++++++++++++++++++++++-------------------= -- >> =A01 files changed, 22 insertions(+), 21 deletions(-) >> >> diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c >> index 34b4159..cac5a3b 100644 >> --- a/gcc/tree-if-conv.c >> +++ b/gcc/tree-if-conv.c >> @@ -300,6 +300,27 @@ parse_predicate (tree cond, tree *op0, tree *op1) >> =A0 =A0return ERROR_MARK; >> =A0} >> >> +/* Returns the fold of predicate C1 OR C2. =A0*/ >> + >> +static tree >> +fold_or_predicates (tree c1, tree c2) >> +{ >> + =A0tree op1a, op1b, op2a, op2b; >> + =A0enum tree_code code1 =3D parse_predicate (c1, &op1a, &op1b); >> + =A0enum tree_code code2 =3D parse_predicate (c2, &op2a, &op2b); >> + >> + =A0if (code1 !=3D ERROR_MARK && code2 !=3D ERROR_MARK) >> + =A0 =A0{ >> + =A0 =A0 =A0tree t =3D maybe_fold_or_comparisons (code1, op1a, op1b, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 code2, op2a, op2b); >> + =A0 =A0 =A0if (t) >> + =A0 =A0 return t; >> + =A0 =A0} >> + >> + =A0return fold_build2_loc (UNKNOWN_LOCATION, TRUTH_OR_EXPR, > > Why did you change it to UNKNOWN_LOCATION? =A0Instead pass in > the location from the caller here. > > Ok with that change (_not_ as a followup). > I will do this and I will post the updated patch. Thanks, Sebastian