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)
/* an interblock motion? */
if (INSN_BB (insn) != target_bb)
{
+ rtx temp;
+
if (IS_SPECULATIVE_INSN (insn))
{
}
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);
}
}
NOTE_SOURCE_FILE (insn));
}
else
- fprintf (dump, " {%s}\n", GET_RTX_NAME (insn));
+ fprintf (dump, " {%s}\n", GET_RTX_NAME (GET_CODE (insn)));
continue;
}