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: [PR debug/47620] schedule boundary debug insns right away


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.

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;
-- 
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 Brazil Compiler Engineer

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