diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b88a93f24eb..611fbcbfca1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2002-05-02 Jan Hubicka + + * 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 * haifa-sched.c (rank_for_schedule): Skip past last_scheduled_insn diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 7af0e73c69e..a42165c7813 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -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); - } + print_insn (buf, insn, 0); + buf[40]=0; + fprintf (sched_dump, ";;\t%3i--> %-40s:", clock, buf); + + if (recog_memoized (insn) < 0) + fprintf (sched_dump, "nothing"); else - { - fprintf (sched_dump, ";;\t\t--> scheduling insn <<<%d>>> on unit ", - INSN_UID (insn)); - insn_print_units (insn); - } - - fprintf (sched_dump, "\n"); + 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); diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c index 31b5f3c19a1..7b07d2cd3f1 100644 --- a/gcc/sched-ebb.c +++ b/gcc/sched-ebb.c @@ -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, diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 2b18c28badc..56c200e86fb 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -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)); diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index d3e8472b3be..48b68542edc 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -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;