* haifa-sched.c (schedule_insn): Print table of instructions and
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2002 00:05:52 +0000 (00:05 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 May 2002 00:05:52 +0000 (00:05 +0000)
        reservations.
        (sched_block): Do not print ready list at verbosity level 1.
        * sched-vis.c (print_insn): Make global.
        * sched-ebb.c (ebb_print_insn): Rename from...
        (print_insn): ... this one.
        * sched-int.h (print_insn): Declare

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53073 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/haifa-sched.c
gcc/sched-ebb.c
gcc/sched-int.h
gcc/sched-vis.c

index b88a93f..611fbcb 100644 (file)
@@ -1,3 +1,13 @@
+2002-05-02  Jan Hubicka  <jh@suse.cz>
+
+       * haifa-sched.c (schedule_insn): Print table of instructions and
+       reservations.
+       (sched_block): Do not print ready list at verbosity level 1.
+       * sched-vis.c (print_insn): Make global.
+       * sched-ebb.c (ebb_print_insn): Rename from...
+       (print_insn): ... this one.
+       * sched-int.h (print_insn): Declare
+
 2002-05-02  Richard Henderson  <rth@redhat.com>
 
        * haifa-sched.c (rank_for_schedule): Skip past last_scheduled_insn
index 7af0e73..a42165c 100644 (file)
@@ -1127,29 +1127,28 @@ schedule_insn (insn, ready, clock)
       || !(*targetm.sched.use_dfa_pipeline_interface) ())
     unit = insn_unit (insn);
 
-  if (sched_verbose >= 2)
+  if (targetm.sched.use_dfa_pipeline_interface
+      && (*targetm.sched.use_dfa_pipeline_interface) ()
+      && sched_verbose >= 1)
     {
+      char buf[2048];
 
-      if (targetm.sched.use_dfa_pipeline_interface
-         && (*targetm.sched.use_dfa_pipeline_interface) ())
-       {
-         fprintf (sched_dump,
-                  ";;\t\t--> scheduling insn <<<%d>>>:reservation ",
-                  INSN_UID (insn));
-         
-         if (recog_memoized (insn) < 0)
-           fprintf (sched_dump, "nothing");
-         else
-           print_reservation (sched_dump, insn);
-       }
-      else
-       {
-         fprintf (sched_dump, ";;\t\t--> scheduling insn <<<%d>>> on unit ",
-                  INSN_UID (insn));
-         insn_print_units (insn);
-       }
+      print_insn (buf, insn, 0);
+      buf[40]=0;
+      fprintf (sched_dump, ";;\t%3i--> %-40s:", clock, buf);
 
-      fprintf (sched_dump, "\n");
+      if (recog_memoized (insn) < 0)
+       fprintf (sched_dump, "nothing");
+      else
+       print_reservation (sched_dump, insn);
+      fputc ('\n', sched_dump);
+    }
+  else if (sched_verbose >= 2)
+    {
+      fprintf (sched_dump, ";;\t\t--> scheduling insn <<<%d>>> on unit ",
+              INSN_UID (insn));
+      insn_print_units (insn);
+      fputc ('\n', sched_dump);
     }
 
   if (!targetm.sched.use_dfa_pipeline_interface
@@ -2052,7 +2051,7 @@ schedule_block (b, rgn_n_insns)
          rtx insn;
          int cost;
 
-         if (sched_verbose)
+         if (sched_verbose >= 2)
            {
              fprintf (sched_dump, ";;\tReady list (t =%3d):  ",
                       clock_var);
index 31b5f3c..7b07d2c 100644 (file)
@@ -49,7 +49,7 @@ static void init_ready_list PARAMS ((struct ready_list *));
 static int can_schedule_ready_p PARAMS ((rtx));
 static int new_ready PARAMS ((rtx));
 static int schedule_more_p PARAMS ((void));
-static const char *print_insn PARAMS ((rtx, int));
+static const char *ebb_print_insn PARAMS ((rtx, int));
 static int rank PARAMS ((rtx, rtx));
 static int contributes_to_priority PARAMS ((rtx, rtx));
 static void compute_jump_reg_dependencies PARAMS ((rtx, regset));
@@ -128,7 +128,7 @@ new_ready (next)
    to be formatted so that multiple output lines will line up nicely.  */
 
 static const char *
-print_insn (insn, aligned)
+ebb_print_insn (insn, aligned)
      rtx insn;
      int aligned ATTRIBUTE_UNUSED;
 {
@@ -188,7 +188,7 @@ static struct sched_info ebb_sched_info =
   schedule_more_p,
   new_ready,
   rank,
-  print_insn,
+  ebb_print_insn,
   contributes_to_priority,
   compute_jump_reg_dependencies,
 
index 2b18c28..56c200e 100644 (file)
@@ -311,4 +311,4 @@ extern int insn_unit PARAMS ((rtx));
 extern int insn_cost PARAMS ((rtx, rtx, rtx));
 extern rtx get_unit_last_insn PARAMS ((int));
 extern int actual_hazard_this_instance PARAMS ((int, int, rtx, int, int));
-
+extern void print_insn PARAMS ((char *, rtx, int));
index d3e8472..48b6854 100644 (file)
@@ -49,7 +49,6 @@ static int get_visual_tbl_length PARAMS ((void));
 static void print_exp PARAMS ((char *, rtx, int));
 static void print_value PARAMS ((char *, rtx, int));
 static void print_pattern PARAMS ((char *, rtx, int));
-static void print_insn PARAMS ((char *, rtx, int));
 
 /* Print names of units on which insn can/should execute, for debugging.  */
 
@@ -759,7 +758,7 @@ print_pattern (buf, x, verbose)
    (Probably the last "option" should be extended somehow, since it
    depends now on sched.c inner variables ...)  */
 
-static void
+void
 print_insn (buf, x, verbose)
      char *buf;
      rtx x;