From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26346 invoked by alias); 9 Sep 2016 21:13:46 -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 26321 invoked by uid 89); 9 Sep 2016 21:13:45 -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=selective 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 21:13:35 +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 u89LDOFY027242; Fri, 9 Sep 2016 16:13:25 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id u89LDNel027241; Fri, 9 Sep 2016 16:13:23 -0500 Date: Fri, 09 Sep 2016 21:13:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: gcc-patches@gcc.gnu.org, bschmidt@redhat.com Subject: Re: [PATCH 6/9] sel-sched: Don't mess with register restores Message-ID: <20160909211323.GA26965@gate.crashing.org> References: <38963d815ea81b55d5b8e2ed85f2b347aad21395.1470015604.git.segher@kernel.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00546.txt.bz2 On Thu, Sep 08, 2016 at 11:54:33AM -0600, Jeff Law wrote: > On 07/31/2016 07:42 PM, Segher Boessenkool wrote: > >If selective scheduling copies register restores it confuses dwarf2cfi. > > > >2016-06-07 Segher Boessenkool > > > > * sel-sched-ir.c (init_global_and_expr_for_insn): Don't copy > > instructions with a REG_CFA_RESTORE note. > Similarly, I think you're papering over a lifetime problem of some kind > here. sel-sched-ir.c says /* Certain instructions cannot be cloned, and frame related insns and the insn adjacent to NOTE_INSN_EPILOGUE_BEG cannot be moved out of their block. */ if (prologue_epilogue_contains (insn)) ... and I'm just extending that to "epilogue" instructions not in the "epilogue" ;-) If all such epilogue instructions always had a REG_CFA_RESTORE note, we could drop the "old" thing; but even instructions restoring a register do not always have such a note (they can be batched up, and they can be not emitted at all if not shrink-wrapping). Segher