+2011-05-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * haifa-sched.c (sched_emit_insn): Emit insn before first
+ non-scheduled insn. Inform back-end about new insn. Add
+ new insn to scheduled_insns list.
+
2011-05-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48822
rtx
sched_emit_insn (rtx pat)
{
- rtx insn = emit_insn_after (pat, last_scheduled_insn);
- last_scheduled_insn = insn;
+ rtx insn = emit_insn_before (pat, nonscheduled_insns_begin);
haifa_init_insn (insn);
+
+ if (current_sched_info->add_remove_insn)
+ current_sched_info->add_remove_insn (insn, 0);
+
+ (*current_sched_info->begin_schedule_ready) (insn);
+ VEC_safe_push (rtx, heap, scheduled_insns, insn);
+
+ last_scheduled_insn = insn;
return insn;
}