This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, vec-tails 09/10] Print more info about vectorized loop
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 May 2016 22:49:04 +0300
- Subject: [PATCH, vec-tails 09/10] Print more info about vectorized loop
- Authentication-results: sourceware.org; auth=none
Hi,
This patch extends dumps for vectorized loops to provide more info
about them and also specify used vector size. This is to be used
for tests.
Thanks,
Ilya
--
gcc/
2016-05-19 Ilya Enkovich <ilya.enkovich@intel.com>
* tree-vect-loop.c (vect_transform_loop): Print more info
about vectorized loop and specify used vector size.
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 7075f29..5572cbb 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -8088,12 +8088,43 @@ vect_transform_loop (loop_vec_info loop_vinfo)
if (dump_enabled_p ())
{
- dump_printf_loc (MSG_NOTE, vect_location,
- "LOOP VECTORIZED\n");
- if (loop->inner)
- dump_printf_loc (MSG_NOTE, vect_location,
- "OUTER LOOP VECTORIZED\n");
- dump_printf (MSG_NOTE, "\n");
+ if (LOOP_VINFO_EPILOGUE_P (loop_vinfo))
+ {
+ if (LOOP_VINFO_ORIG_MASK_EPILOGUE (loop_vinfo))
+ {
+ gcc_assert (LOOP_VINFO_COMBINE_EPILOGUE (loop_vinfo));
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "LOOP EPILOGUE VECTORIZED AND MASKED (VS=%d)\n",
+ current_vector_size);
+ }
+ else
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "LOOP EPILOGUE VECTORIZED (VS=%d)\n",
+ current_vector_size);
+ }
+ else
+ {
+ if (LOOP_VINFO_NEED_MASKING (loop_vinfo))
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "LOW TRIP COUNT LOOP VECTORIZED AND MASKED "
+ "(VS=%d)\n", current_vector_size);
+ else
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "LOOP VECTORIZED (VS=%d)\n",
+ current_vector_size);
+ if (LOOP_VINFO_COMBINE_EPILOGUE (loop_vinfo))
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "LOOP EPILOGUE COMBINED (VS=%d)\n",
+ current_vector_size);
+ }
+
+ if (loop->inner)
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "OUTER LOOP VECTORIZED (VS=%d)\n",
+ current_vector_size);
+ dump_printf (MSG_NOTE, "\n");
+ }
}
/* Free SLP instances here because otherwise stmt reference counting