OSDN Git Service

* timevar.c (getrusage): Don't ever declare if not HAVE_GETRUSAGE.
[pf3gnuchains/gcc-fork.git] / gcc / sched-ebb.c
index 67f8884..5fa64f1 100644 (file)
@@ -23,6 +23,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 \f
 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "toplev.h"
 #include "rtl.h"
 #include "tm_p.h"
@@ -38,6 +40,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #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;
@@ -87,17 +90,9 @@ init_ready_list (ready)
      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++;
     }
 }
 
@@ -220,6 +215,9 @@ schedule_ebb (head, tail)
   /* 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);
 
@@ -283,21 +281,19 @@ schedule_ebbs (dump_file)
 
   /* 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;
 
@@ -355,7 +351,5 @@ schedule_ebbs (dump_file)
   if (write_symbols != NO_DEBUG)
     rm_redundant_line_notes ();
 
-  scope_to_insns_finalize ();
-
   sched_finish ();
 }