X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fhaifa-sched.c;h=8bea5e3811e60df698e6461860e4fc5f23c78b6e;hp=de75286ef282c757962bfb2a773115554797d387;hb=ab41202099d11e8eb23da94a9b697adce103a8ec;hpb=15a03e56bf060a5bf8c2200245b1f9b78ac072a3 diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index de75286ef28..8bea5e3811e 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -766,7 +766,8 @@ dying_use_p (struct reg_use_data *use) struct reg_use_data *next; for (next = use->next_regno_use; next != use; next = next->next_regno_use) - if (QUEUE_INDEX (next->insn) != QUEUE_SCHEDULED) + if (NONDEBUG_INSN_P (next->insn) + && QUEUE_INDEX (next->insn) != QUEUE_SCHEDULED) return false; return true; } @@ -1585,7 +1586,8 @@ setup_insn_max_reg_pressure (rtx after, bool update_p) max_reg_pressure[ira_reg_class_cover[i]] = curr_reg_pressure[ira_reg_class_cover[i]]; for (insn = NEXT_INSN (after); - insn != NULL_RTX && BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (after); + insn != NULL_RTX && ! BARRIER_P (insn) + && BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (after); insn = NEXT_INSN (insn)) if (NONDEBUG_INSN_P (insn)) { @@ -1694,6 +1696,7 @@ schedule_insn (rtx insn) sd_iterator_cond (&sd_it, &dep);) { rtx dbg = DEP_PRO (dep); + struct reg_use_data *use, *next; gcc_assert (DEBUG_INSN_P (dbg)); @@ -1715,6 +1718,14 @@ schedule_insn (rtx insn) INSN_VAR_LOCATION_LOC (dbg) = gen_rtx_UNKNOWN_VAR_LOC (); df_insn_rescan (dbg); + /* Unknown location doesn't use any registers. */ + for (use = INSN_REG_USE_LIST (dbg); use != NULL; use = next) + { + next = use->next_insn_use; + free (use); + } + INSN_REG_USE_LIST (dbg) = NULL; + /* We delete rather than resolve these deps, otherwise we crash in sched_free_deps(), because forward deps are expected to be released before backward deps. */ @@ -1834,27 +1845,22 @@ concat_note_lists (rtx from_end, rtx *to_endp) void remove_notes (rtx head, rtx tail) { - rtx next_tail, prev, insn, next; + rtx next_tail, insn, next; note_list = 0; if (head == tail && !INSN_P (head)) return; next_tail = NEXT_INSN (tail); - prev = PREV_INSN (head); for (insn = head; insn != next_tail; insn = next) { next = NEXT_INSN (insn); if (!NOTE_P (insn)) - { - prev = insn; - continue; - } + continue; switch (NOTE_KIND (insn)) { case NOTE_INSN_BASIC_BLOCK: - prev = insn; continue; case NOTE_INSN_EPILOGUE_BEG: