From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89280 invoked by alias); 9 Jul 2019 19:13:20 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 89271 invoked by uid 89); 9 Jul 2019 19:13:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=fredrik, MOV, PR9663, peepholealike 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; Tue, 09 Jul 2019 19:13:19 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D87E53086234; Tue, 9 Jul 2019 19:13:05 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-18.rdu2.redhat.com [10.10.112.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA6C70699; Tue, 9 Jul 2019 19:13:01 +0000 (UTC) Subject: Re: ARM peephole2 from 2003 never merged, still valid To: Fredrik Hederstierna , Segher Boessenkool , "Richard Earnshaw (lists)" Cc: "gcc@gcc.gnu.org" References: <20190602122853.GJ31586@gate.crashing.org> <36c103ab-9a9c-8131-e21c-fa67f8ad526e@redhat.com> <20190605234635.GW31586@gate.crashing.org> <20190606140242.GX31586@gate.crashing.org> <96a7575b-246d-d732-bdca-44e67aa7f499@arm.com> <20190606164935.GY31586@gate.crashing.org> From: Jeff Law Openpgp: preference=signencrypt Message-ID: <9dc89d7d-d6be-d09c-3b75-f4ca9ac0856a@redhat.com> Date: Tue, 09 Jul 2019 19:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00079.txt.bz2 On 7/8/19 12:41 AM, Fredrik Hederstierna wrote: >> From: Segher Boessenkool Sent: >> Thursday, June 6, 2019 6:49 PM To: Richard Earnshaw (lists) Cc: >> Fredrik Hederstierna; Jeff Law; gcc@gcc.gnu.org Subject: Re: ARM >> peephole2 from 2003 never merged, still valid >> >> >> On Thu, Jun 06, 2019 at 05:06:35PM +0100, Richard Earnshaw (lists) >> wrote: >>> The reason combine doesn't catch this is because at the time it >>> runs the MOV is in a different basic block. Later on it is sunk >>> into the same basic block, but it's then too late to do the >>> merge. >> >> Or you could say the MOV didn't even exist yet: the insn that is >> merged by the peephole is created by the prologue code, >> eventually. >> >> This isn't really a target problem, it is very much generic, but I >> don't see a better solution than a peephole either. >> >> Segher > > So what is the conclusion, should be re-open PR-9663 and try to fix > the missing peephole? I think there will always be cases where the > code generated target specific register optimizations are possible, > that not necessarily have any direct connection of the actual basic > blocks but more by chance which instructions are finally generated > after each other, where maybe eg peephole-alike optimizers are the > only solution to do the job? /Fredrik > I think it's largely up to the ARM maintainers. Based on my understanding of the thread, I'd go with the peephole2. jeff