/* Instruction scheduling pass.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
and currently maintained by, Jim Wilson (wilson@cygnus.com)
at time CLOCK. The scheduler using only DFA description should
never use the following function. */
-HAIFA_INLINE static void
+static void
schedule_unit (int unit, rtx insn, int clock)
{
int i;
was COST. The scheduler using only DFA description should never
use the following function. */
-HAIFA_INLINE static int
+static int
actual_hazard (int unit, rtx insn, int clock, int cost)
{
int i;
insns_removed++;
if (insns_removed == flag_sched_stalled_insns)
- /* remove only one insn from Q at a time */
+ /* Remove only one insn from Q at a time. */
return insns_removed;
}
}
}
}
-/* Called from backends from targetm.sched.reorder to emit stuff into
- the instruction stream. */
-
-rtx
-sched_emit_insn (rtx pat)
-{
- rtx insn = emit_insn_after (pat, last_scheduled_insn);
- last_scheduled_insn = insn;
- return insn;
-}
-
/* Use forward list scheduling to rearrange insns of block B in region RGN,
possibly bringing insns from subsequent blocks in the same region. */
removing death notes. */
FOR_EACH_BB_REVERSE (b)
find_insn_reg_weight (b->index);
+
+ if (targetm.sched.md_init_global)
+ (*targetm.sched.md_init_global) (sched_dump, sched_verbose, old_max_uid);
}
/* Free global data used during insn scheduling. */
end_alias_analysis ();
if (write_symbols != NO_DEBUG)
free (line_note_head);
+
+ if (targetm.sched.md_finish_global)
+ (*targetm.sched.md_finish_global) (sched_dump, sched_verbose);
}
#endif /* INSN_SCHEDULING */