+Mon Sep 1 22:13:18 1997 Jeffrey A Law (law@cygnus.com)
+
+ * version.c: Bump for snapshot.
+
+ * haifa-sched.c (move_insn): Handle notes correctly for insns
+ with SCHED_GROUP_P set.
+
Mon Sep 1 16:58:57 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* alpha/xm-linux.h (USE_BFD): Undef before define.
}
/* Move INSN, and all insns which should be issued before it,
- due to SCHED_GROUP_P flag. Reemit notes if needed. */
+ due to SCHED_GROUP_P flag. Reemit notes if needed.
+
+ Return the last insn emitted by the scheduler, which is the
+ return value from the first call to reemit_notes. */
static rtx
move_insn (insn, last)
rtx insn, last;
{
- rtx new_last = insn;
+ rtx retval = NULL;
+ /* If INSN has SCHED_GROUP_P set, then issue it and any other
+ insns with SCHED_GROUP_P set first. */
while (SCHED_GROUP_P (insn))
{
rtx prev = PREV_INSN (insn);
+
+ /* Move a SCHED_GROUP_P insn. */
move_insn1 (insn, last);
+ /* If this is the first call to reemit_notes, then record
+ its return value. */
+ if (retval == NULL_RTX)
+ retval = reemit_notes (insn, insn);
+ else
+ reemit_notes (insn, insn);
insn = prev;
}
+ /* Now move the first non SCHED_GROUP_P insn. */
move_insn1 (insn, last);
- return reemit_notes (new_last, new_last);
+
+ /* If this is the first call to reemit_notes, then record
+ its return value. */
+ if (retval == NULL_RTX)
+ retval = reemit_notes (insn, insn);
+ else
+ reemit_notes (insn, insn);
+
+ return retval;
}
/* Return an insn which represents a SCHED_GROUP, which is