This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [SFN] Bootstrap broken


On Dec 13, 2017, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Dec 12, 2017, David Edelsohn <dje.gcc@gmail.com> wrote:
>> Rainer,
>> PR83396 opened.  you can add Solaris to the list of targets.

> Andreas,

> Here's a fix for the ia64 regression you mentioned in that PR.

And here's a patch that fixes the two other ia64 build failures you'd
mentioned.

Regstrapped on x86_64- and i686-linux-gnu by myself; bootstrapped on
ia64-linux-gnu by yourself IIUC, though with some weird bootstrap
compare errors I'm very curious to learn more about.

Ok to install?

Emitting markers before labels turned out to not be worth the trouble.
The markers outside BBs confuse the ebb scheduler, and they don't add
any useful information.  I'll arrange for markers to be moved past
labels, even in gimple, but for now this will fix the two remaining
known problems on ia64.

for  gcc/ChangeLog

	PR bootstrap/83396
	* cfgexpand.c (expand_gimple_basic_block): Expand label first,
	even if there are markers before it.
	* cfgrtl.c (rtl_verify_bb_layout): Reject DEBUG_INSNs outside BBs.
---
 gcc/cfgexpand.c |   12 ++++--------
 gcc/cfgrtl.c    |    1 -
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index ce98264214ae..30d9bac1118e 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -5510,20 +5510,16 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
   gimple *label_stmt = stmt;
   rtx_code_label **elt = lab_rtx_for_bb->get (bb);
 
-  if (stmt)
-    /* We'll get to it in the loop below, and get back to
-       emit_label_and_note then.  */
-    ;
-  else if (stmt || elt)
+  if (stmt || elt)
     {
-    emit_label_and_note:
       gcc_checking_assert (!note);
       last = get_last_insn ();
 
       if (stmt)
 	{
 	  expand_gimple_stmt (stmt);
-	  gsi_next (&gsi);
+	  if (gsi_stmt (gsi) == stmt)
+	    gsi_next (&gsi);
 	}
 
       if (elt)
@@ -5550,7 +5546,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
       stmt = gsi_stmt (gsi);
 
       if (stmt == label_stmt)
-	goto emit_label_and_note;
+	continue;
 
       /* If this statement is a non-debug one, and we generate debug
 	 insns, then this one might be the last real use of a TERed
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index b127ea1a0b38..bc1e3ee7ece8 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -2954,7 +2954,6 @@ rtl_verify_bb_layout (void)
 	    {
 	    case BARRIER:
 	    case NOTE:
-	    case DEBUG_INSN:
 	      break;
 
 	    case CODE_LABEL:


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]