From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27910 invoked by alias); 27 Apr 2017 16:53:58 -0000 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 Received: (qmail 27892 invoked by uid 89); 27 Apr 2017 16:53:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 16:53:55 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 622EA6264E; Thu, 27 Apr 2017 16:53:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 622EA6264E Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 622EA6264E Received: from localhost.localdomain (ovpn-117-12.phx2.redhat.com [10.3.117.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F78989091; Thu, 27 Apr 2017 16:53:55 +0000 (UTC) Subject: Re: [PING][PATCH] Move the check for any_condjump_p from sched-deps to target macros To: "Hurugalawadi, Naveen" , Wilco Dijkstra , "gcc-patches@gcc.gnu.org" Cc: "Pinski, Andrew" , "roland.illig@gmx.de" , "joseph@codesourcery.com" , "dmalcolm@redhat.com" , nd , James Greenhalgh , Marcus Shawcroft , Richard Earnshaw , "ramana.radhakrishnan@foss.arm.com" References: From: Jeff Law Message-ID: <675f27f3-2ea4-2c0b-84f2-c92c1289fbaf@redhat.com> Date: Thu, 27 Apr 2017 17:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg01416.txt.bz2 On 04/26/2017 06:50 AM, Hurugalawadi, Naveen wrote: > Hi Wilco, > > Thanks for reviewing the patch. > >>> The return false seems incorrect - it means a core can either have >>> FUSE_CMP_BRANCH or FUSE_ALU_BRANCH but not both. > Thanks for pointing out about the confusion. > Modified the code as required. > > Bootstrapped and Regression tested on AArch64 and X86_64. > Please review the patch and let us know if its okay? > > Thanks, > Naveen > > > fusion-anycond-jump-1.patch > > > diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c > index b2393bf..b15a865 100644 > --- a/gcc/sched-deps.c > +++ b/gcc/sched-deps.c > @@ -2835,33 +2835,16 @@ sched_macro_fuse_insns (rtx_insn *insn) > { > rtx_insn *prev; > > - if (any_condjump_p (insn)) > - { > - unsigned int condreg1, condreg2; > - rtx cc_reg_1; > - targetm.fixed_condition_code_regs (&condreg1, &condreg2); > - cc_reg_1 = gen_rtx_REG (CCmode, condreg1); > - prev = prev_nonnote_nondebug_insn (insn); > - if (!reg_referenced_p (cc_reg_1, PATTERN (insn)) > - || !prev > - || !modified_in_p (cc_reg_1, prev)) > - return; > - } > - else > - { > - rtx insn_set = single_set (insn); > - > - prev = prev_nonnote_nondebug_insn (insn); > - if (!prev > - || !insn_set > - || !single_set (prev)) > - return; > + rtx insn_set = single_set (insn); > > - } > + prev = prev_nonnote_nondebug_insn (insn); > + if (!prev > + || !insn_set > + || !single_set (prev)) > + return; > > if (targetm.sched.macro_fusion_pair_p (prev, insn)) > SCHED_GROUP_P (insn) = 1; > - > } Doesn't this avoid calling the target hook in cases where it used to call it before? Consider a conditional jump inside a parallel that is not a single set. Previously that could call the target hook and potentially set SCHED_GROUP_P. But after your change I think it would return without ever querying the backend. jeff