From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52190 invoked by alias); 15 Sep 2016 16:51:50 -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 52176 invoked by uid 89); 15 Sep 2016 16:51:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=mystery 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; Thu, 15 Sep 2016 16:51:48 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2472172D38; Thu, 15 Sep 2016 16:51:45 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-2.phx2.redhat.com [10.3.116.2]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8FGphcD020066; Thu, 15 Sep 2016 12:51:43 -0400 Subject: Re: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped To: Segher Boessenkool References: <7e74a019-d477-348f-2dc6-744e1db38f2f@redhat.com> <20160909204107.GC21356@gate.crashing.org> <14ff3e40-4c2c-7e8b-b822-07ff3575b771@redhat.com> <20160910064052.GA7255@gate.crashing.org> <32231187-0fa2-815d-ab89-7e3d15b646d4@redhat.com> <20160914130458.GA4896@gate.crashing.org> <85cb1e59-f383-129e-bea7-e179f913c0c9@redhat.com> <20160914190353.GA22273@gate.crashing.org> <92f35909-2f70-487a-5e24-d38bff9daa4b@redhat.com> <20160914221127.GC22273@gate.crashing.org> Cc: Bernd Schmidt , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com From: Jeff Law Message-ID: Date: Thu, 15 Sep 2016 17:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160914221127.GC22273@gate.crashing.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00970.txt.bz2 On 09/14/2016 04:11 PM, Segher Boessenkool wrote: > On Wed, Sep 14, 2016 at 01:33:04PM -0600, Jeff Law wrote: >> On 09/14/2016 01:03 PM, Segher Boessenkool wrote: >>>> If you think about it, conceptually we want the return insn to make the >>>> callee saved registers "used" so that DCE, regrename and friends don't >>>> muck with them. The fact that we don't is as much never having to care >>>> all that much until recently. >>> >>> (There is no return insn at those exits; these are exits *without* >>> successor block, not the exit block). >> Ugh. Anywhere we could attach this stuff in the insn chain? If not, >> the DF side of this problem gets uglier. > > I put the USEs at the start of that noreturn basic block. Just naked USEs of the REG? For some reason I was uneasy about this, but I can't recall why, maybe I just latched onto CALL_INSN_FUNCTION_USAGE and wanted to use the same model. Seems like we should just go with the naked USE of the REGs. >> While it is just a reachability problem, I don't think we need to solve >> it if we mark anything that was separately shrink wrapped as live at all >> the exit points. > > Agreed, but why does it work if not separately shrink-wrapping anything? > And why does it break on things that are *not* separately wrapped *anywhere*? That I don't know... It's a hell of a mystery. Jeff