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 > <seg...@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 <seg...@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