diff mbox

[PR,debug/47620] schedule boundary debug insns right away

Message ID orr5b96tqu.fsf@livre.localdomain
State New
Headers show

Commit Message

Alexandre Oliva Feb. 15, 2011, 6:24 p.m. UTC
After revamping the way we dealt with boundary debug insns in the
scheduler, some platforms started failing builds when the scheduler
attempted to queue a debug insns that was to be scheduled in the 0th
tick, but we were at tick -1.

With this patch, we add the initial debug insn to the ready list at tick
-1, rather than queue it up for cycle 0, and they get scheduled just as
expected.

This fixed the bootstrap problems on ppc64-linux-gnu and
s390x-linux-gnu.  There's apparently still some lingering problem on
s390-linux-gnu, but I suppose this fix can go in independently.  Ok to
install?
diff mbox

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/47620
	PR debug/47630
	* haifa-sched.c (fix_tick_ready): Don't queue boundary debug insns.

Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c.orig	2011-02-12 10:26:29.000000000 -0200
+++ gcc/haifa-sched.c	2011-02-12 10:39:17.584244783 -0200
@@ -3929,6 +3929,15 @@  fix_tick_ready (rtx next)
 	  if (!full_p)
 	    break;
         }
+
+      /* We can't queue debug insns, but we would try to during
+	 init_ready_list when a debug insn is the very first.  Arrange
+	 for it to be added to the ready list instead.  */
+      if (!tick && clock_var == -1 && DEBUG_INSN_P (next))
+	{
+	  gcc_checking_assert (q_size == 0);
+	  tick = -1;
+	}
     }
   else
     tick = -1;