diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-08-19 18:02:21 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-08-19 12:02:21 -0600 |
commit | 4f64eacaeec81753d30ecb684ec8f3ba2f3b9f7b (patch) | |
tree | f95ab913195ecdea40864952181507cf8c9b7b5d /gcc | |
parent | 61822835053e781234306e21ac787f066b26f59f (diff) | |
download | gcc-4f64eacaeec81753d30ecb684ec8f3ba2f3b9f7b.zip gcc-4f64eacaeec81753d30ecb684ec8f3ba2f3b9f7b.tar.gz gcc-4f64eacaeec81753d30ecb684ec8f3ba2f3b9f7b.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/haifa-sched.c | 32 |
2 files changed, 32 insertions, 9 deletions
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; } |