From 605d05b9481832bc691685b7ff990ef68f02b1bb Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 19 Sep 2024 12:37:13 +0200 Subject: [PATCH] Always dump generated distance vectors There's special-casing for equal access functions which bypasses printing the distance vectors. The following makes sure we print them always which helps debugging. * tree-data-ref.cc (build_classic_dist_vector): Move distance vector dumping to single caller ... (subscript_dependence_tester): ... here, dumping always when we succeed computing it. --- gcc/tree-data-ref.cc | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/gcc/tree-data-ref.cc b/gcc/tree-data-ref.cc index 26e6d9a5657..0f173e8803a 100644 --- a/gcc/tree-data-ref.cc +++ b/gcc/tree-data-ref.cc @@ -5547,21 +5547,6 @@ build_classic_dist_vector (struct data_dependence_relation *ddr, DDR_NB_LOOPS (ddr), 0)); } - if (dump_file && (dump_flags & TDF_DETAILS)) - { - unsigned i; - - fprintf (dump_file, "(build_classic_dist_vector\n"); - for (i = 0; i < DDR_NUM_DIST_VECTS (ddr); i++) - { - fprintf (dump_file, " dist_vector = ("); - print_lambda_vector (dump_file, DDR_DIST_VECT (ddr, i), - DDR_NB_LOOPS (ddr)); - fprintf (dump_file, " )\n"); - } - fprintf (dump_file, ")\n"); - } - return true; } @@ -5673,7 +5658,24 @@ subscript_dependence_tester (struct data_dependence_relation *ddr, compute_subscript_distance (ddr); if (build_classic_dist_vector (ddr, loop_nest)) - build_classic_dir_vector (ddr); + { + if (dump_file && (dump_flags & TDF_DETAILS)) + { + unsigned i; + + fprintf (dump_file, "(build_classic_dist_vector\n"); + for (i = 0; i < DDR_NUM_DIST_VECTS (ddr); i++) + { + fprintf (dump_file, " dist_vector = ("); + print_lambda_vector (dump_file, DDR_DIST_VECT (ddr, i), + DDR_NB_LOOPS (ddr)); + fprintf (dump_file, " )\n"); + } + fprintf (dump_file, ")\n"); + } + + build_classic_dir_vector (ddr); + } } /* Returns true when all the access functions of A are affine or