From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10524 invoked by alias); 15 May 2019 06:48:46 -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 10516 invoked by uid 89); 15 May 2019 06:48:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,MEDICAL_SUBJECT autolearn=no version=3.3.1 spammy=HTo:U*ebotcazou X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 May 2019 06:48:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D4644374; Tue, 14 May 2019 23:48:43 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 33C703F71E; Tue, 14 May 2019 23:48:43 -0700 (PDT) From: Richard Sandiford To: Eric Botcazou Mail-Followup-To: Eric Botcazou ,, richard.sandiford@arm.com Cc: Subject: Re: New .md construct: define_insn_and_rewrite References: <2745710.abvoBQgxZg@polaris> Date: Wed, 15 May 2019 06:48:00 -0000 In-Reply-To: <2745710.abvoBQgxZg@polaris> (Eric Botcazou's message of "Tue, 14 May 2019 18:56:27 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-05/txt/msg00774.txt.bz2 Eric Botcazou writes: >> This patch therefore adds a new construct called define_insn_and_rewrite. >> It's basically a define_insn_and_split with an implicit split pattern, >> obtained by copying the insn pattern and replacing match_operands with >> match_dups and match_operators with match_op_dups. > > Isn't that what define_subst does in a different context? > >> Any comments? Suggestions for better names? > > define_insn_and_subst? define_subst is a static substitution though, creating multiple insn codes, whereas the substitution here is dynamic and can be controlled by C++ code. It might be confusing to link the two. Thanks, Richard