From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108525 invoked by alias); 21 Feb 2020 15:53:19 -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 108516 invoked by uid 89); 21 Feb 2020 15:53:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=H*i:sk:d942fcf, H*MI:sk:d942fcf, H*f:sk:d942fcf X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Feb 2020 15:53:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4016B30E; Fri, 21 Feb 2020 07:53:16 -0800 (PST) Received: from [10.2.80.62] (e120808-lin.cambridge.arm.com [10.2.80.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8DF4A3F68F; Fri, 21 Feb 2020 07:53:15 -0800 (PST) Subject: Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops To: Roman Zhuykov , Andrea Corallo , "gcc-patches@gcc.gnu.org" Cc: Richard Earnshaw , nd References: <8468875e-934e-0bee-763d-91dd5ddbe7c9@arm.com> <4a28de0a-6790-732f-31bd-0e5bdfc12246@ispras.ru> From: Kyrill Tkachov Message-ID: <43603611-48c9-7364-66c5-f0eede699208@foss.arm.com> Date: Fri, 21 Feb 2020 15:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2020-02/txt/msg01219.txt.bz2 Hi Roman, On 2/21/20 3:49 PM, Roman Zhuykov wrote: > 11.02.2020 14:00, Richard Earnshaw (lists) wrote: >> +(define_insn "*doloop_end" >> +  [(parallel [(set (pc) >> +                   (if_then_else >> +                       (ne (reg:SI LR_REGNUM) (const_int 1)) >> +                     (label_ref (match_operand 0 "" "")) >> +                     (pc))) >> +              (set (reg:SI LR_REGNUM) >> +                   (plus:SI (reg:SI LR_REGNUM) (const_int -1)))])] >> +  "TARGET_32BIT && TARGET_HAVE_LOB && !flag_modulo_sched" >> +  "le\tlr, %l0") >> >> Is it deliberate that this pattern name has a '*' prefix?  doloop_end >> is a named expansion pattern according to md.texi. >> >> R. > 21.02.2020 18:30, Kyrill Tkachov wrote: >> +;; Originally expanded by 'doloop_end'. >> +(define_insn "doloop_end_internal" >> >> We usually prefer to name these patterns with a '*' in front to >> prevent the gen* machinery from generating gen_* unneeded expanders >> for them if they're not used. >> > It seems you and Richard asking Andrea to do the opposite things. > :) LOL.patch Almost, but not exactly incompatible things ;) doloop_end is a standard name and if we wanted to use it directly it cannot have a '*', which Richard is right to point out. Once "doloop_end" is moved to its own expander and the define_insn is doloop_end_internal, there is no reason for it to not have a '*' as its gen_* form is never called. Thanks, Kyrill > Roman > > PS. I don't have an idea what approach is correct.