diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 13:05:39 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 13:05:39 +0000 |
commit | 8da090de25c137d37dd64115b1d2fa26f02577d7 (patch) | |
tree | 74bf293401a0a1429a8339ebe33c9c46166e95f7 /gcc/haifa-sched.c | |
parent | 2025948bd01df153e9f3c16bd1f70ab97c9327a1 (diff) | |
download | gcc-8da090de25c137d37dd64115b1d2fa26f02577d7.tar.gz |
2011-01-26 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 169285
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@169287 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index bd3b84c5c23..68499f12b1c 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1900,8 +1900,30 @@ 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)); + } + else if (!DEBUG_INSN_P (note)) + break; + } + + break; + } else break; @@ -1913,8 +1935,33 @@ 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)) + df_insn_change_bb (note, NULL); + } + else if (!DEBUG_INSN_P (note)) + break; + } + + break; + } else break; @@ -1928,8 +1975,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 +2858,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 +3365,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; |