From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52689 invoked by alias); 20 May 2016 21:27:36 -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 52654 invoked by uid 89); 20 May 2016 21:27:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=watch 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 (AES256-SHA encrypted) ESMTPS; Fri, 20 May 2016 21:27:25 +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 u4KLRHk1020575; Fri, 20 May 2016 16:27:17 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id u4KLRG27020574; Fri, 20 May 2016 16:27:16 -0500 Date: Fri, 20 May 2016 21:27:00 -0000 From: Segher Boessenkool To: Thomas Schwinge Cc: gcc-patches@gcc.gnu.org, Jeff Law Subject: Re: [PATCH 3/3] function: Restructure *logue insertion Message-ID: <20160520212716.GB9252@gate.crashing.org> References: <213485283eede9da12b217737d95fc8f5c4be442.1463428211.git.segher@kernel.crashing.org> <70c67b8f39aca9cf574f617fbfce43b93e2560ff.1463428211.git.segher@kernel.crashing.org> <5236cc2d-fb6b-351d-2c9f-1c1419ddcf8a@redhat.com> <20160519222046.GE8443@gate.crashing.org> <87shxdt6x2.fsf@kepler.schwinge.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87shxdt6x2.fsf@kepler.schwinge.homeip.net> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg01698.txt.bz2 On Fri, May 20, 2016 at 11:28:25AM +0200, Thomas Schwinge wrote: > > > > * function.c (make_epilogue_seq): Remove epilogue_end parameter. > > > > (thread_prologue_and_epilogue_insns): Remove bb_flags. Restructure > > > > code. Ignore sibcalls on EDGE_IGNORE edges. > > > > * shrink-wrap.c (handle_simple_exit): New function. Set EDGE_IGNORE > > > > on edges for sibcalls that run without prologue. The rest of the > > > > function is combined from... > > > > (fix_fake_fallthrough_edge): ... this, and ... > > > > (try_shrink_wrapping): ... a part of this. Remove the bb_with > > > > function argument, make it a local variable. > > On Thu, 19 May 2016 17:20:46 -0500, Segher Boessenkool wrote: > > On Thu, May 19, 2016 at 04:00:22PM -0600, Jeff Law wrote: > > > OK for the trunk, but please watch closely for any fallout. > > > > Thanks, and I will! > > With nvptx offloading on x86_64 GNU/Linux, this (r236491) is causing > several execution test failures. I'll have a look. nvptx calls thread_prologue_and_epilogue_insns directly. It seems in the "normal" way there always is a commit_edge_insertions afterwards, but for nvptx there isn't. thrread_prologue_and_epilogue_insertions should do it itself, of course. This patch fixes it; regression tested on powerpc64-linux, and Thomas says it looks good on nvptx. Committing to trunk as obvious. Segher === This fixes a bug in my r236491: on nvptx, functions without prologue would not get an epilogue either. 2016-05-20 Segher Boessenkool * function.c (thread_prologue_and_epilogue_insns): Commit the insertion of the epilogue. --- gcc/function.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/function.c b/gcc/function.c index 25e0e0c..b517012 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5977,6 +5977,7 @@ thread_prologue_and_epilogue_insns (void) if (epilogue_seq) { insert_insn_on_edge (epilogue_seq, exit_fallthru_edge); + commit_edge_insertions (); /* The epilogue insns we inserted may cause the exit edge to no longer be fallthru. */ -- 1.9.3