From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8628 invoked by alias); 6 Sep 2016 23:02: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 8591 invoked by uid 89); 6 Sep 2016 23:02:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=legacy 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; Tue, 06 Sep 2016 23:02:39 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 1F82964371; Tue, 6 Sep 2016 23:02:38 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-177.phx2.redhat.com [10.3.116.177]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u86N2b3W025392; Tue, 6 Sep 2016 19:02:37 -0400 Subject: Re: [PATCH, rs6000] Fix PR72827 (ada bootstrap failure) To: Segher Boessenkool References: <83ced7a8-d832-87d8-aaf6-03a55300af62@linux.vnet.ibm.com> <20160831061954.GB21601@gate.crashing.org> <9091974.6AZfFVcF36@arcturus.home> <3451b7ff-16ac-5da9-cfce-620569501a99@redhat.com> <20160906221413.GA4327@gate.crashing.org> Cc: Eric Botcazou , Bill Schmidt , GCC Patches , David Edelsohn From: Jeff Law Message-ID: Date: Wed, 07 Sep 2016 00:10: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: <20160906221413.GA4327@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/msg00354.txt.bz2 On 09/06/2016 04:14 PM, Segher Boessenkool wrote: > On Tue, Sep 06, 2016 at 03:24:24PM -0600, Jeff Law wrote: >> On 08/31/2016 01:08 AM, Eric Botcazou wrote: >>>> DSE should really detect this is happening and not do the wrong thing. >>>> Maybe add an assert somewhere? Much easier to debug, that way. >>> >>> That sounds fragile, functions are allowed to fiddle with the frame >>> pointer in >>> the prologue or epilogue (but of course not in the body). I think that >>> DSE is >>> not the only RTL pass which makes this assumption of invariant frame >>> pointer >>> in the body, it seems rather fundamental in the RTL middle-end. >> That's my recollection as well -- I recall many patches flying by >> through the years that assumed the frame pointer was invariant -- but >> they were mostly (all?) in things that ran before we add the >> prologue/epilogue to the INSN chain. > > We could simply check if the frame pointer (or stack pointer) is changed > while RTX_FRAME_RELATED_P is not set? Can that ever happen on "proper" > code? Worth a try, though I'm not convinced we're setting RTX_FRAME_RELATED_P correctly, particularly for the legacy targets. jeff