]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2018-10-08 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2018 12:29:51 +0000 (12:29 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Oct 2018 12:29:51 +0000 (12:29 +0000)
* 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.

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

gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h

index e53b7956644fd20601412755f3aeed91e9b3e319..b7265c0236ed71cdcf412329ca325865dc9783e1 100644 (file)
@@ -1,3 +1,11 @@
+2018-10-08  Richard Biener  <rguenther@suse.de>
+
+       * 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  <rguenther@suse.de>
 
        PR tree-optimization/63155
index 6ea1e77d4baaf4c1190b1a4a935623c1035880e7..177b284e9c617a41c33d1387ba5afbed51d8ed00 100644 (file)
@@ -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.  */
index 747fb67ba13e80309377e66945a40f5e48f186c5..0ab366b79a33b20680da619a5d6040a52953570d 100644 (file)
@@ -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)
     {
index 63cff797dd8016890c81c149a0eb971758a67197..988456808318dabd0058f6b0d038f8c272e75c6b 100644 (file)
@@ -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.  */