\f
#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "toplev.h"
#include "rtl.h"
#include "tm_p.h"
#include "recog.h"
#include "cfglayout.h"
#include "sched-int.h"
+#include "target.h"
\f
/* The number of insns to be scheduled in total. */
static int target_n_insns;
Count number of insns in the target block being scheduled. */
for (insn = NEXT_INSN (prev_head); insn != next_tail; insn = NEXT_INSN (insn))
{
- rtx next;
-
- if (! INSN_P (insn))
- continue;
- next = NEXT_INSN (insn);
-
- if (INSN_DEP_COUNT (insn) == 0
- && (SCHED_GROUP_P (next) == 0 || ! INSN_P (next)))
+ if (INSN_DEP_COUNT (insn) == 0)
ready_add (ready, insn);
- if (!(SCHED_GROUP_P (insn)))
- target_n_insns++;
+ target_n_insns++;
}
}
/* Compute INSN_DEPEND. */
compute_forward_dependences (head, tail);
+ if (targetm.sched.dependencies_evaluation_hook)
+ targetm.sched.dependencies_evaluation_hook (head, tail);
+
/* Set priorities. */
n_insns = set_priorities (head, tail);
/* Taking care of this degenerate case makes the rest of
this code simpler. */
- if (num_basic_blocks == 0)
+ if (n_basic_blocks == 0)
return;
- scope_to_insns_initialize ();
-
sched_init (dump_file);
current_sched_info = &ebb_sched_info;
allocate_reg_life_data ();
- compute_bb_for_insn (get_max_uid ());
+ compute_bb_for_insn ();
/* Schedule every region in the subroutine. */
- FOR_ALL_BB (bb)
- {
+ FOR_EACH_BB (bb)
+ {
rtx head = bb->head;
rtx tail;
if (write_symbols != NO_DEBUG)
rm_redundant_line_notes ();
- scope_to_insns_finalize ();
-
sched_finish ();
}