From: Richard Biener Date: Mon, 8 Oct 2018 12:29:51 +0000 (+0000) Subject: tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Open a dump scope. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=269ba95042e9fa35f6fa4c8270339bb932e8f7e9;p=gcc.git tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Open a dump scope. 2018-10-08 Richard Biener * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Open a dump scope. * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it. * tree-vectorizer.h (dump_stmt_cost): Adjust. (add_stmt_cost): Dump return value of the hook. From-SVN: r264923 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e53b7956644..b7265c0236e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-10-08 Richard Biener + + * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): + Open a dump scope. + * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it. + * tree-vectorizer.h (dump_stmt_cost): Adjust. + (add_stmt_cost): Dump return value of the hook. + 2018-10-08 Richard Biener PR tree-optimization/63155 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 6ea1e77d4ba..177b284e9c6 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1072,6 +1072,8 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo) int nbbs = loop->num_nodes, factor; int innerloop_iters, i; + DUMP_VECT_SCOPE ("vect_compute_single_scalar_iteration_cost"); + /* Gather costs for statements in the scalar loop. */ /* FORNOW. */ diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 747fb67ba13..0ab366b79a3 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -89,7 +89,7 @@ dump_user_location_t vect_location; void dump_stmt_cost (FILE *f, void *data, int count, enum vect_cost_for_stmt kind, - stmt_vec_info stmt_info, int misalign, + stmt_vec_info stmt_info, int misalign, unsigned cost, enum vect_cost_model_location where) { fprintf (f, "%p ", data); @@ -159,6 +159,7 @@ dump_stmt_cost (FILE *f, void *data, int count, enum vect_cost_for_stmt kind, fprintf (f, "%s ", ks); if (kind == unaligned_load || kind == unaligned_store) fprintf (f, "(misalign %d) ", misalign); + fprintf (f, "costs %u ", cost); const char *ws = "unknown"; switch (where) { diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 63cff797dd8..98845680831 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1199,7 +1199,8 @@ init_cost (struct loop *loop_info) } extern void dump_stmt_cost (FILE *, void *, int, enum vect_cost_for_stmt, - stmt_vec_info, int, enum vect_cost_model_location); + stmt_vec_info, int, unsigned, + enum vect_cost_model_location); /* Alias targetm.vectorize.add_stmt_cost. */ @@ -1208,10 +1209,12 @@ add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, stmt_vec_info stmt_info, int misalign, enum vect_cost_model_location where) { + unsigned cost = targetm.vectorize.add_stmt_cost (data, count, kind, + stmt_info, misalign, where); if (dump_file && (dump_flags & TDF_DETAILS)) - dump_stmt_cost (dump_file, data, count, kind, stmt_info, misalign, where); - return targetm.vectorize.add_stmt_cost (data, count, kind, - stmt_info, misalign, where); + dump_stmt_cost (dump_file, data, count, kind, stmt_info, misalign, + cost, where); + return cost; } /* Alias targetm.vectorize.finish_cost. */