public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/3] function: Factor out make_*logue_seq
Date: Thu, 19 May 2016 07:28:00 -0000	[thread overview]
Message-ID: <20160519072815.GA6926@gate.crashing.org> (raw)
In-Reply-To: <20160519071626.GY28550@tucnak.redhat.com>

On Thu, May 19, 2016 at 09:16:26AM +0200, Jakub Jelinek wrote:
> On Wed, May 18, 2016 at 05:13:25PM -0500, Segher Boessenkool wrote:
> > On Wed, May 18, 2016 at 01:35:16PM -0500, Segher Boessenkool wrote:
> > > On Wed, May 18, 2016 at 11:20:29AM -0700, H.J. Lu wrote:
> > > > >> >         * function.c (make_split_prologue_seq, make_prologue_seq,
> > > > >> >         make_epilogue_seq): New functions, factored out from...
> > > > >> >         (thread_prologue_and_epilogue_insns): Here.
> > > > >>
> > > > >> It breaks x86:
> > > > >
> > > > > Are you sure it is this patch causing it?  As noted, it was tested on x86.
> > > > 
> > > > I am pretty sure.  How did you test it on x86?
> > > 
> > > "make -k check".  I'll test 32-bit now.
> > 
> > Actually, it also fails on 64 bit.  It passed my testing because it does
> > not fail together with patch 3/3, and does not fail on powerpc at all.
> 
> If 3/3 isn't approved soon, can you please revert the problematic commit
> until it is if that patch can't work right on its own and needs the other
> patch too)?  The trunk is in terrible state right now at least on
> x86_64/i686-linux, various tests hang forever (e.g. some cleanup-* tests)
> and there are hundreds of failures, making it impossible to do proper
> regression testing.

[ You could just revert it locally if it hinders other testing -- I have
to do that all the time for pawtches breaking powerpc ].

The following fixes it, tested on x86_64-linux.  Is it okay for trunk?

(It only happens for targets that have a splitter gated by epilogue_done
for their eh_return pattern).


Segher


2016-05-19  Segher Boessenkool  <segher@kernel.crashing.org>

	* function.c (thread_prologue_and_epilogue_insn): Move the
	"goto epilogue_done" one block later.


diff --git a/gcc/function.c b/gcc/function.c
index 1c56253..4c236eb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5960,11 +5960,6 @@ thread_prologue_and_epilogue_insns (void)
 
   exit_fallthru_edge = find_fallthru_edge (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds);
 
-  /* If nothing falls through into the exit block, we don't need an
-     epilogue.  */
-  if (exit_fallthru_edge == NULL)
-    goto epilogue_done;
-
   /* A small fib -- epilogue is not yet completed, but we wish to re-use
      this marker for the splits of EH_RETURN patterns, and nothing else
      uses the flag in the meantime.  */
@@ -5994,6 +5989,11 @@ thread_prologue_and_epilogue_insns (void)
       emit_note_after (NOTE_INSN_EPILOGUE_BEG, prev);
     }
 
+  /* If nothing falls through into the exit block, we don't need an
+     epilogue.  */
+  if (exit_fallthru_edge == NULL)
+    goto epilogue_done;
+
   if (epilogue_seq)
     {
       insert_insn_on_edge (epilogue_seq, exit_fallthru_edge);

  reply	other threads:[~2016-05-19  7:28 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 [this message]
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
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=20160519072815.GA6926@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jakub@redhat.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).