From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 47BEE389365C for ; Fri, 24 Apr 2020 21:07:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 47BEE389365C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 03OL7Wg6010808; Fri, 24 Apr 2020 16:07:32 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 03OL7VCn010805; Fri, 24 Apr 2020 16:07:31 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 24 Apr 2020 16:07:31 -0500 From: Segher Boessenkool To: Stefan Franke Cc: gcc-help@gcc.gnu.org Subject: Re: Additional peephole pass(es) Message-ID: <20200424210731.GB26902@gate.crashing.org> References: <04d901d616fd$55668f50$0033adf0$@franke.ms> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04d901d616fd$55668f50$0033adf0$@franke.ms> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:07:38 -0000 Hi! On Mon, Apr 20, 2020 at 12:20:35PM +0200, Stefan Franke wrote: > is there a chance that a patch would be accepted if it adds (an) additional > peephole pass(es)? That would need some serious justification. > I'm not content with the capabilities of the combine pass Sorry to hear that. Do you have any concrete complaints? > and a convenient > way would be to insert an additional pass in front/after the combine pass. > It's way easier to maintain than the spaghetti code in combine and ss long Spaghetti code? Heh. There is a lot of run-on code; there is a little bit of action-at-a-distance; and almost all other sins imaginable are committed somewhere as well, but spaghetti? Not so much :-) > there is nothing defined in the cpu's md file, the pass gets skipped, so the > overhead for non-users is almost non existent. > > > > Right now I'm applying the same set as in the final peephole run, but I > would add a separate keyword per pass, e.g. peephole_precombine, etc. p.p. > > > > Your thoughts? It probably would help if you could start with an example that shows that an extra peephole pass would help. Segher