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

login
register
mail settings
Submitter Alexandre Oliva
Date Feb. 19, 2011, 8:57 p.m.
Message ID <or62sf2149.fsf@livre.localdomain>
Download mbox | patch
Permalink /patch/83716/
State New
Headers show

Comments

Alexandre Oliva - Feb. 19, 2011, 8:57 p.m.
On Feb 18, 2011, Vladimir Makarov <vmakarov@redhat.com> wrote:

> On 02/15/2011 01:24 PM, Alexandre Oliva wrote:
>     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.

> Yes, Alex.  Thanks for fixing this problem.

Thanks for the review.  I ended up having to tweak it further, but I'm
going ahead and checking it in because it's essentially the same idea,
just slightly generalized to other debug insns.

Regstrapped on x86_64-linux-gnu, i686-pc-linux-gnu, powerpc64-linux-gnu,
s390x-linux-gnu and s390-linux-gnu (thanks, Jakub!).  I'm going ahead
and checking it in.

Patch

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

	PR debug/47620
	PR debug/47630
	* haifa-sched.c (fix_tick_ready): Skip tick computation
	for debug insns.

Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c.orig	2011-02-14 08:40:11.038553356 -0200
+++ gcc/haifa-sched.c	2011-02-17 19:27:31.612583867 -0200
@@ -3903,7 +3903,7 @@  fix_tick_ready (rtx next)
 {
   int tick, delay;
 
-  if (!sd_lists_empty_p (next, SD_LIST_RES_BACK))
+  if (!DEBUG_INSN_P (next) && !sd_lists_empty_p (next, SD_LIST_RES_BACK))
     {
       int full_p;
       sd_iterator_def sd_it;