From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7067 invoked by alias); 9 Sep 2016 15:51:41 -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 7053 invoked by uid 89); 9 Sep 2016 15:51:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=deleting X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Sep 2016 15:51:30 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id u89FpQo1003816; Fri, 9 Sep 2016 10:51:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id u89FpOjC003812; Fri, 9 Sep 2016 10:51:24 -0500 Date: Fri, 09 Sep 2016 15:59:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: gcc-patches@gcc.gnu.org, bschmidt@redhat.com Subject: Re: [PATCH 3/9] dce: Don't dead-code delete separately wrapped restores Message-ID: <20160909155124.GG28260@gate.crashing.org> References: <4af162bf22c8a405100c31f57ac2c3b0de9b721e.1470015604.git.segher@kernel.crashing.org> <61006d4e-2345-749b-19f6-2d342acba6b4@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61006d4e-2345-749b-19f6-2d342acba6b4@redhat.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00513.txt.bz2 On Thu, Sep 08, 2016 at 11:50:56AM -0600, Jeff Law wrote: > On 07/31/2016 07:42 PM, Segher Boessenkool wrote: > >Deleting restores (before a noreturn) that are dead confuses dwarf2cfi. > > > >2016-06-07 Segher Boessenkool > > > > * dce.c (delete_unmarked_insns): Don't delete instructions with > > a REG_CFA_RESTORE note. > I don't really understand this one. Why is the restore marked dead and > why doesn't that happen for normal epilogues? Something wonky seems to > be going on here. Because it's not behind a NOTE_INSN_EPILOGUE_BEGIN it is not treated specially by DCE, like insns in "normal" epilogues are. It is marked dead because it *is* dead: the value in the callee-save register is not used by anything anymore (noreturn!) Segher