From: Ulrich Weigand Date: Mon, 2 May 2011 13:16:55 +0000 (+0000) Subject: haifa-sched.c (sched_emit_insn): Emit insn before first non-scheduled insn. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2dfdcb4bebb6ce3a5ee2da2b8aa7166df860d4d2;p=gcc.git haifa-sched.c (sched_emit_insn): Emit insn before first non-scheduled insn. * 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. From-SVN: r173251 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8d20385cf6e..f910409bfc7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-02 Ulrich Weigand + + * 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 PR tree-optimization/48822 diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 15d8f65375f..f5580b867ab 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -5650,9 +5650,16 @@ sched_create_empty_bb_1 (basic_block after) 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; }