From: Jeffrey A Law Date: Tue, 19 Aug 1997 18:02:21 +0000 (+0000) Subject: haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P insns too. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f64eacaeec81753d30ecb684ec8f3ba2f3b9f7b;p=platform%2Fupstream%2Fgcc.git haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P insns too. * haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P insns too. (schedule_block): When adjusting basic_block_{head,end}, account for movement of SCHED_GROUP_P insns too. * haifa-sched.c (debug_dependencies): Fix thinko. From-SVN: r14849 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89814a5..4348398 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,9 +1,16 @@ Tue Aug 19 09:34:57 1997 Jeffrey A Law (law@cygnus.com) + * haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P + insns too. + (schedule_block): When adjusting basic_block_{head,end}, account + for movement of SCHED_GROUP_P insns too. + + * haifa-sched.c (debug_dependencies): Fix thinko. + * Makefile.in (EXPECT, RUNTEST, RUNTESTFLAGS): Define. (site.exp, check, check-g++, check-gcc): New targets. - * haifa-sched.c: Make lots of variable static. + * haifa-sched.c: Make lots of variables static. Tue Aug 19 07:18:34 1997 H.J. Lu (hjl@gnu.ai.mit.edu) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 0fab54b..222a6d6 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -6842,6 +6842,8 @@ schedule_block (bb, rgn, rgn_n_insns) /* an interblock motion? */ if (INSN_BB (insn) != target_bb) { + rtx temp; + if (IS_SPECULATIVE_INSN (insn)) { @@ -6862,20 +6864,34 @@ schedule_block (bb, rgn, rgn_n_insns) } nr_inter++; - /* update source block boundaries */ - b1 = INSN_BLOCK (insn); - if (insn == basic_block_head[b1] + temp = insn; + while (SCHED_GROUP_P (temp)) + temp = PREV_INSN (temp); + + /* Update source block boundaries. */ + b1 = INSN_BLOCK (temp); + if (temp == basic_block_head[b1] && insn == basic_block_end[b1]) { - emit_note_after (NOTE_INSN_DELETED, basic_block_head[b1]); - basic_block_end[b1] = basic_block_head[b1] = NEXT_INSN (insn); + /* We moved all the insns in the basic block. + Emit a note after the last insn and update the + begin/end boundaries to point to the note. */ + emit_note_after (NOTE_INSN_DELETED, insn); + basic_block_end[b1] = NEXT_INSN (insn); + basic_block_head[b1] = NEXT_INSN (insn); } else if (insn == basic_block_end[b1]) { - basic_block_end[b1] = PREV_INSN (insn); + /* We took insns from the end of the basic block, + so update the end of block boundary so that it + points to the first insn we did not move. */ + basic_block_end[b1] = PREV_INSN (temp); } - else if (insn == basic_block_head[b1]) + else if (temp == basic_block_head[b1]) { + /* We took insns from the start of the basic block, + so update the start of block boundary so that + it points to the first insn we did not move. */ basic_block_head[b1] = NEXT_INSN (insn); } } @@ -7385,7 +7401,7 @@ debug_dependencies () NOTE_SOURCE_FILE (insn)); } else - fprintf (dump, " {%s}\n", GET_RTX_NAME (insn)); + fprintf (dump, " {%s}\n", GET_RTX_NAME (GET_CODE (insn))); continue; }