diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2011-02-02 04:31:35 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2011-02-02 04:31:35 +0000 |
commit | a59d15cf9f9a6daa75072e8f5b0ab93d279274b3 (patch) | |
tree | 45c11f92ea932c870f55bc85a553c33839b01d65 /gcc/haifa-sched.c | |
parent | 6fc2f091e7e70574c17d229bb6b9e6db1e0d385a (diff) | |
download | gcc-a59d15cf9f9a6daa75072e8f5b0ab93d279274b3.zip gcc-a59d15cf9f9a6daa75072e8f5b0ab93d279274b3.tar.gz gcc-a59d15cf9f9a6daa75072e8f5b0ab93d279274b3.tar.bz2 |
re PR debug/47498 (-fcompare-debug failure with -fsched2-use-superblocks)
gcc/ChangeLog:
PR debug/47498
PR debug/47501
PR debug/45136
PR debug/45130
* haifa-sched.c (get_ebb_head_tail): Move notes across boundary
debug insns.
(no_real_insns_p, schedule_block, set_priorities): Drop special
treatment of boundary debug insns.
* sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug
insns.
* sched-ebb.c (schedule_ebbs): Adjust skipping of debug insns.
* sched-int.h (DEBUG_INSN_SCHED_P): Remove.
(BOUNDARY_DEBUG_INSN_P): Likewise.
(SCHEDULE_DEBUG_INSN_P): Likewise.
* sched-rgn.c (init_ready_list): Drop special treatment of
boundary debug insns.
* final.c (rest_of_clean_state): Clear notes' BB.
gcc/testsuite/ChangeLog:
PR debug/47498
PR debug/47501
PR debug/45136
PR debug/45130
* debug/pr47498.c: New.
* debug/pr47501.c: New.
From-SVN: r169513
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index bd3b84c..9f7d06a 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1900,8 +1900,33 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp) beg_head = NEXT_INSN (beg_head); while (beg_head != beg_tail) - if (NOTE_P (beg_head) || BOUNDARY_DEBUG_INSN_P (beg_head)) + if (NOTE_P (beg_head)) beg_head = NEXT_INSN (beg_head); + else if (DEBUG_INSN_P (beg_head)) + { + rtx note, next; + + for (note = NEXT_INSN (beg_head); + note != beg_tail; + note = next) + { + next = NEXT_INSN (note); + if (NOTE_P (note)) + { + if (sched_verbose >= 9) + fprintf (sched_dump, "reorder %i\n", INSN_UID (note)); + + reorder_insns_nobb (note, note, PREV_INSN (beg_head)); + + if (BLOCK_FOR_INSN (note) != beg) + df_insn_change_bb (note, beg); + } + else if (!DEBUG_INSN_P (note)) + break; + } + + break; + } else break; @@ -1913,8 +1938,36 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp) end_head = NEXT_INSN (end_head); while (end_head != end_tail) - if (NOTE_P (end_tail) || BOUNDARY_DEBUG_INSN_P (end_tail)) + if (NOTE_P (end_tail)) end_tail = PREV_INSN (end_tail); + else if (DEBUG_INSN_P (end_tail)) + { + rtx note, prev; + + for (note = PREV_INSN (end_tail); + note != end_head; + note = prev) + { + prev = PREV_INSN (note); + if (NOTE_P (note)) + { + if (sched_verbose >= 9) + fprintf (sched_dump, "reorder %i\n", INSN_UID (note)); + + reorder_insns_nobb (note, note, end_tail); + + if (end_tail == BB_END (end)) + BB_END (end) = note; + + if (BLOCK_FOR_INSN (note) != end) + df_insn_change_bb (note, end); + } + else if (!DEBUG_INSN_P (note)) + break; + } + + break; + } else break; @@ -1928,8 +1981,7 @@ no_real_insns_p (const_rtx head, const_rtx tail) { while (head != NEXT_INSN (tail)) { - if (!NOTE_P (head) && !LABEL_P (head) - && !BOUNDARY_DEBUG_INSN_P (head)) + if (!NOTE_P (head) && !LABEL_P (head)) return 0; head = NEXT_INSN (head); } @@ -2812,7 +2864,7 @@ schedule_block (basic_block *target_bb) last_scheduled_insn = prev_head; gcc_assert ((NOTE_P (last_scheduled_insn) - || BOUNDARY_DEBUG_INSN_P (last_scheduled_insn)) + || DEBUG_INSN_P (last_scheduled_insn)) && BLOCK_FOR_INSN (last_scheduled_insn) == *target_bb); /* Initialize INSN_QUEUE. Q_SIZE is the total number of insns in the @@ -3319,7 +3371,7 @@ set_priorities (rtx head, rtx tail) current_sched_info->sched_max_insns_priority; rtx prev_head; - if (head == tail && (! INSN_P (head) || BOUNDARY_DEBUG_INSN_P (head))) + if (head == tail && ! INSN_P (head)) gcc_unreachable (); n_insn = 0; |