From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60274 invoked by alias); 9 Oct 2015 21:10:39 -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 60246 invoked by uid 89); 9 Oct 2015 21:10:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 09 Oct 2015 21:10:38 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id A301591592; Fri, 9 Oct 2015 21:10:36 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-105.phx2.redhat.com [10.3.113.105]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t99LAYcF030782; Fri, 9 Oct 2015 17:10:35 -0400 Subject: Re: [PR64164] drop copyrename, integrate into expand To: Alexandre Oliva , Szabolcs Nagy References: <20150723203112.GB27818@gate.crashing.org> <20150810082355.GA31149@arm.com> <55C8BFC3.3030603@redhat.com> <55E72D4C.40705@arm.com> <55FC3171.7040509@arm.com> <560A6B26.7010701@arm.com> Cc: Alan Lawrence , James Greenhalgh , "H.J. Lu" , Segher Boessenkool , Richard Biener , GCC Patches , Christophe Lyon , David Edelsohn , Eric Botcazou From: Jeff Law Message-ID: <56182D4A.5010002@redhat.com> Date: Fri, 09 Oct 2015 21:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.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: 2015-10/txt/msg01027.txt.bz2 On 10/07/2015 04:36 PM, Alexandre Oliva wrote: > On Sep 29, 2015, Szabolcs Nagy wrote: > >> this commit > >> commit 33cc9081157a8c90460e4c0bdda2ac461a3822cc >> Author: aoliva >> Date: 2015-09-27 09:02:00 +0000 > >> revert to assign_parms assignments using default defs >> ... > >> introduced a test failure on arm-none-eabi (using newlib, compiling >> with -mthumb -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard ): > >> FAIL: gcc.target/arm/pr43920-2.c scan-assembler-times pop 2 > > Thanks for the report. > > The problem here is that we don't allocate the pseudo assigned to > to r0. That's because we coalesce versions with > another variable that crosses a function call. We do that because > uncprop brings these unrelated variables, that happen to contain the > same -1 value we want to return, into the PHI node with the final > value. > > We can't coalesce both start and end with , because start and > end conflict, but by chance we try start first, and that succeeds. If > we tried end first (e.g., by giving it a higher coalesce priority, > because fewer calls are crossed by its value in the path to the relevant > edge), we could have got the coalesced variable assigned to r0, and that > would enable us to optimize out the copy to r0 before return, and so > merge the return-only basic block with other blocks. But ATM we don't > take the definition point or path to the edge into account when > computing coalesce costs, so we can't deterministically do better for > this testcase, and I'm not sure using these additional information would > make it better overall. > > Compiling with -fno-tree-dominator-opts skips uncprop so that we don't > even try to coalesce other variables with , so we get the code > expected by the testcase. But we obviously don't want to disable this > optimization in general. > > Any other thoughts, anyone? I keep coming back to my idea to avoid uncprop when doing so creates conflicts. See c#22, c#24 & c#28. It looks like I tossed my WIP around those ideas when you fixed 64164. Jeff