From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81851 invoked by alias); 8 Oct 2015 10:00:47 -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 81841 invoked by uid 89); 8 Oct 2015 10:00:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f180.google.com Received: from mail-yk0-f180.google.com (HELO mail-yk0-f180.google.com) (209.85.160.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 08 Oct 2015 10:00:44 +0000 Received: by ykba192 with SMTP id a192so39794999ykb.3 for ; Thu, 08 Oct 2015 03:00:43 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.125.6 with SMTP id y6mr4443127ywc.5.1444298442980; Thu, 08 Oct 2015 03:00:42 -0700 (PDT) Received: by 10.37.93.136 with HTTP; Thu, 8 Oct 2015 03:00:42 -0700 (PDT) In-Reply-To: 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> Date: Thu, 08 Oct 2015 10:00:00 -0000 Message-ID: Subject: Re: [PR64164] drop copyrename, integrate into expand From: Richard Biener To: Alexandre Oliva Cc: Szabolcs Nagy , Alan Lawrence , Jeff Law , James Greenhalgh , "H.J. Lu" , Segher Boessenkool , GCC Patches , Christophe Lyon , David Edelsohn , Eric Botcazou Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00809.txt.bz2 On Thu, Oct 8, 2015 at 12:36 AM, 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? Bad luck? Add some heuristics that always help? Ok, that wasn't really useful :/ Richard. > > -- > Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ > You must be the change you wish to see in the world. -- Gandhi > Be Free! -- http://FSFLA.org/ FSF Latin America board member > Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer