From patchwork Sat Feb 19 20:57:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PR,debug/47620] schedule boundary debug insns right away From: Alexandre Oliva X-Patchwork-Id: 83716 Message-Id: To: Vladimir Makarov Cc: gcc-patches@gcc.gnu.org Date: Sat, 19 Feb 2011 18:57:58 -0200 On Feb 18, 2011, Vladimir Makarov 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 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;