On 11/6/24 14:20, Vineet Gupta wrote:
> This is broken out of predecessor promotion patch so that debugging can
> proceed during stage1 restrictions.
>
> Signed-off-by: Vineet Gupta <vine...@rivosinc.com>

ping !


> ---
>  gcc/haifa-sched.cc | 10 +++++-----
>  gcc/sched-rgn.cc   | 14 ++++++++++++--
>  2 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/haifa-sched.cc b/gcc/haifa-sched.cc
> index cd4b6baddcd2..4d3977576eed 100644
> --- a/gcc/haifa-sched.cc
> +++ b/gcc/haifa-sched.cc
> @@ -3762,10 +3762,10 @@ model_choose_insn (void)
>        count = param_max_sched_ready_insns;
>        while (count > 0 && insn)
>       {
> -       fprintf (sched_dump, ";;\t+---   %d [%d, %d, %d, %d]\n",
> +       fprintf (sched_dump, ";;\t+---   %d [%d, %d, %d, %d][%d]\n",
>                  INSN_UID (insn->insn), insn->model_priority,
>                  insn->depth + insn->alap, insn->depth,
> -                INSN_PRIORITY (insn->insn));
> +                INSN_PRIORITY (insn->insn), insn->unscheduled_preds);
>         count--;
>         insn = insn->next;
>       }
> @@ -3859,11 +3859,11 @@ model_reset_queue_indices (void)
>     to sched_dump.  */
>  
>  static void
> -model_dump_pressure_summary (void)
> +model_dump_pressure_summary (basic_block bb)
>  {
>    int pci, cl;
>  
> -  fprintf (sched_dump, ";; Pressure summary:");
> +  fprintf (sched_dump, ";; Pressure summary (bb %d):", bb->index);
>    for (pci = 0; pci < ira_pressure_classes_num; pci++)
>      {
>        cl = ira_pressure_classes[pci];
> @@ -3902,7 +3902,7 @@ model_start_schedule (basic_block bb)
>    model_curr_point = 0;
>    initiate_reg_pressure_info (df_get_live_in (bb));
>    if (sched_verbose >= 1)
> -    model_dump_pressure_summary ();
> +    model_dump_pressure_summary (bb);
>  }
>  
>  /* Free the information associated with GROUP.  */
> diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc
> index 4f511b3ca504..0e7891f99392 100644
> --- a/gcc/sched-rgn.cc
> +++ b/gcc/sched-rgn.cc
> @@ -2856,15 +2856,25 @@ void debug_dependencies (rtx_insn *head, rtx_insn 
> *tail)
>        else
>       print_reservation (sched_dump, insn);
>  
> -      fprintf (sched_dump, "\t: ");
> +      fprintf (sched_dump, "\t: FW:");
>        {
>       sd_iterator_def sd_it;
>       dep_t dep;
>  
>       FOR_EACH_DEP (insn, SD_LIST_FORW, sd_it, dep)
> -       fprintf (sched_dump, "%d%s%s ", INSN_UID (DEP_CON (dep)),
> +       fprintf (sched_dump, " %d%s%s%s", INSN_UID (DEP_CON (dep)),
> +                DEP_TYPE (dep) == REG_DEP_TRUE ? "t" : "",
>                  DEP_NONREG (dep) ? "n" : "",
>                  DEP_MULTIPLE (dep) ? "m" : "");
> +     if (sched_verbose >= 5)
> +       {
> +         fprintf (sched_dump, "\n;;\t\t\t\t\t\t: BK:");
> +         FOR_EACH_DEP (insn, SD_LIST_HARD_BACK, sd_it, dep)
> +           fprintf (sched_dump, " %d%s%s%s", INSN_UID (DEP_PRO (dep)),
> +                    DEP_TYPE (dep) == REG_DEP_TRUE ? "t" : "",
> +                    DEP_NONREG (dep) ? "n" : "",
> +                    DEP_MULTIPLE (dep) ? "m" : "");
> +       }
>        }
>        fprintf (sched_dump, "\n");
>      }

Reply via email to