public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, Jeff Law <law@redhat.com>
Subject: Re: [PATCH 3/3] function: Restructure *logue insertion
Date: Fri, 20 May 2016 21:27:00 -0000	[thread overview]
Message-ID: <20160520212716.GB9252@gate.crashing.org> (raw)
In-Reply-To: <87shxdt6x2.fsf@kepler.schwinge.homeip.net>

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 <segher@kernel.crashing.org> 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  <segher@kernel.crashing.org>

	* 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

  parent reply	other threads:[~2016-05-20 21:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17  1:09 [PATCH 1/3] function: Do the CLEANUP_EXPENSIVE after shrink-wrapping, not before Segher Boessenkool
2016-05-17  1:09 ` [PATCH 2/3] function: Factor out make_*logue_seq Segher Boessenkool
2016-05-17 20:35   ` Jeff Law
2016-05-18 17:17   ` H.J. Lu
2016-05-18 18:11     ` Segher Boessenkool
2016-05-18 18:20       ` H.J. Lu
2016-05-18 18:24         ` H.J. Lu
2016-05-18 18:35         ` Segher Boessenkool
2016-05-18 22:13           ` Segher Boessenkool
2016-05-19  7:16             ` Jakub Jelinek
2016-05-19  7:28               ` Segher Boessenkool
2016-05-19  7:41                 ` Jakub Jelinek
2016-05-19 17:20               ` Jeff Law
2016-05-17  1:09 ` [PATCH 3/3] function: Restructure *logue insertion Segher Boessenkool
2016-05-19  8:04   ` Segher Boessenkool
2016-05-19 22:00   ` Jeff Law
2016-05-19 22:20     ` Segher Boessenkool
2016-05-20  9:28       ` Thomas Schwinge
2016-05-20 13:21         ` Thomas Schwinge
2016-05-20 14:47           ` Nathan Sidwell
2016-05-20 15:35             ` Segher Boessenkool
2016-05-20 21:27         ` Segher Boessenkool [this message]
2016-05-17  8:06 ` [PATCH 1/3] function: Do the CLEANUP_EXPENSIVE after shrink-wrapping, not before Eric Botcazou
2016-05-17  8:47   ` Segher Boessenkool
2016-05-17  9:08     ` Eric Botcazou
2016-05-17  9:18       ` Segher Boessenkool
2016-05-17 22:23         ` Segher Boessenkool
2016-05-17 22:34           ` Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160520212716.GB9252@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).