tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS here, also noting vector...
authorRichard Biener <rguenther@suse.de>
Fri, 15 Jun 2018 12:41:46 +0000 (12:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 15 Jun 2018 12:41:46 +0000 (12:41 +0000)
2018-06-15  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
here, also noting vector size used.
* tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
size used in MSG_OPTIMIZED_LOCATIONS dump.
(pass_slp_vectorize::execute): Adjust.

From-SVN: r261626

gcc/ChangeLog
gcc/tree-vect-slp.c
gcc/tree-vectorizer.c

index 8f0819a07e7dc8b319a6b51025690be2b46f7fc9..fe7f74cd5a7317f2eee414aae703ccefee94f68b 100644 (file)
@@ -1,3 +1,11 @@
+2018-06-15  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
+       here, also noting vector size used.
+       * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
+       size used in MSG_OPTIMIZED_LOCATIONS dump.
+       (pass_slp_vectorize::execute): Adjust.
+
 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
 
        PR target/85968
index 0a96a9379a26839e4feb16166744445d3cdb84b9..5e8a0d0fc43fa1577e9d2a5d8c68abf8aa7eb1fd 100644 (file)
@@ -3036,9 +3036,16 @@ vect_slp_bb (basic_block bb)
 
          vect_schedule_slp (bb_vinfo);
 
-         if (dump_enabled_p ())
-           dump_printf_loc (MSG_NOTE, vect_location,
-                            "basic block part vectorized\n");
+         unsigned HOST_WIDE_INT bytes;
+         if (current_vector_size.is_constant (&bytes))
+           dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                            "basic block part vectorized using "
+                            HOST_WIDE_INT_PRINT_UNSIGNED " byte "
+                            "vectors\n", bytes);
+         else
+           dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                            "basic block part vectorized using variable "
+                            "length vectors\n");
 
          vectorized = true;
        }
index 8ff90b37ee65f452294431ae4ccc10e742f04916..eb9129051b53df778ae7bfa822d31f4557076158 100644 (file)
@@ -794,7 +794,7 @@ vectorize_loops (void)
                  }
                if (! has_mask_load_store && vect_slp_bb (bb))
                  {
-                   dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                   dump_printf_loc (MSG_NOTE, vect_location,
                                     "basic block vectorized\n");
                    fold_loop_internal_call (loop_vectorized_call,
                                             boolean_true_node);
@@ -827,10 +827,17 @@ vectorize_loops (void)
 
        if (loop_vectorized_call)
          set_uid_loop_bbs (loop_vinfo, loop_vectorized_call);
-        if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOCATION
-           && dump_enabled_p ())
-          dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
-                           "loop vectorized\n");
+
+       unsigned HOST_WIDE_INT bytes;
+       if (current_vector_size.is_constant (&bytes))
+         dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                          "loop vectorized vectorized using "
+                          HOST_WIDE_INT_PRINT_UNSIGNED " byte "
+                          "vectors\n", bytes);
+       else
+         dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                          "loop vectorized using variable length vectors\n");
+
        new_loop = vect_transform_loop (loop_vinfo);
        num_vectorized_loops++;
        /* Now that the loop has been vectorized, allow it to be unrolled
@@ -1066,8 +1073,7 @@ pass_slp_vectorize::execute (function *fun)
   FOR_EACH_BB_FN (bb, fun)
     {
       if (vect_slp_bb (bb))
-       dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
-                        "basic block vectorized\n");
+       dump_printf_loc (MSG_NOTE, vect_location, "basic block vectorized\n");
     }
 
   if (!in_loop_pipeline)