diff options
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 315 |
1 files changed, 181 insertions, 134 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index c51b3e2c316..76b64dd4102 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -28,7 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "basic-block.h" #include "gimple-pretty-print.h" -#include "tree-flow.h" +#include "tree-ssa.h" #include "tree-pass.h" #include "cfgloop.h" #include "expr.h" @@ -188,7 +188,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== vect_determine_vectorization_factor ==="); + "=== vect_determine_vectorization_factor ===\n"); for (i = 0; i < nbbs; i++) { @@ -202,6 +202,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) { dump_printf_loc (MSG_NOTE, vect_location, "==> examining phi: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); + dump_printf (MSG_NOTE, "\n"); } gcc_assert (stmt_info); @@ -216,6 +217,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "get vectype for scalar type: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, scalar_type); + dump_printf (MSG_NOTE, "\n"); } vectype = get_vectype_for_scalar_type (scalar_type); @@ -228,6 +230,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) "data-type "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, scalar_type); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -237,11 +240,13 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) { dump_printf_loc (MSG_NOTE, vect_location, "vectype: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype); + dump_printf (MSG_NOTE, "\n"); } nunits = TYPE_VECTOR_SUBPARTS (vectype); if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "nunits = %d", nunits); + dump_printf_loc (MSG_NOTE, vect_location, "nunits = %d\n", + nunits); if (!vectorization_factor || (nunits > vectorization_factor)) @@ -265,6 +270,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "==> examining statement: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0); + dump_printf (MSG_NOTE, "\n"); } gcc_assert (stmt_info); @@ -286,12 +292,13 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "==> examining pattern statement: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0); + dump_printf (MSG_NOTE, "\n"); } } else { if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "skip."); + dump_printf_loc (MSG_NOTE, vect_location, "skip.\n"); gsi_next (&si); continue; } @@ -336,6 +343,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) "==> examining pattern def stmt: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_def_stmt, 0); + dump_printf (MSG_NOTE, "\n"); } stmt = pattern_def_stmt; @@ -359,6 +367,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) "not vectorized: irregular stmt."); dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -370,6 +379,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: vector stmt in loop:"); dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -394,6 +404,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "get vectype for scalar type: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, scalar_type); + dump_printf (MSG_NOTE, "\n"); } vectype = get_vectype_for_scalar_type (scalar_type); if (!vectype) @@ -405,6 +416,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) "data-type "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, scalar_type); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -415,6 +427,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) { dump_printf_loc (MSG_NOTE, vect_location, "vectype: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype); + dump_printf (MSG_NOTE, "\n"); } } @@ -428,6 +441,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "get vectype for scalar type: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, scalar_type); + dump_printf (MSG_NOTE, "\n"); } vf_vectype = get_vectype_for_scalar_type (scalar_type); if (!vf_vectype) @@ -438,6 +452,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) "not vectorized: unsupported data-type "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, scalar_type); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -455,6 +470,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) dump_printf (MSG_MISSED_OPTIMIZATION, " and "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, vf_vectype); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -463,11 +479,12 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) { dump_printf_loc (MSG_NOTE, vect_location, "vectype: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, vf_vectype); + dump_printf (MSG_NOTE, "\n"); } nunits = TYPE_VECTOR_SUBPARTS (vf_vectype); if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "nunits = %d", nunits); + dump_printf_loc (MSG_NOTE, vect_location, "nunits = %d\n", nunits); if (!vectorization_factor || (nunits > vectorization_factor)) vectorization_factor = nunits; @@ -482,13 +499,13 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) /* TODO: Analyze cost. Decide if worth while to vectorize. */ if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "vectorization factor = %d", + dump_printf_loc (MSG_NOTE, vect_location, "vectorization factor = %d\n", vectorization_factor); if (vectorization_factor <= 1) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: unsupported data-type"); + "not vectorized: unsupported data-type\n"); return false; } LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor; @@ -530,6 +547,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init, dump_generic_expr (MSG_NOTE, TDF_SLIM, step_expr); dump_printf (MSG_NOTE, ", init: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, init_expr); + dump_printf (MSG_NOTE, "\n"); } *init = init_expr; @@ -547,7 +565,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "step unknown."); + "step unknown.\n"); return false; } @@ -573,7 +591,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== vect_analyze_scalar_cycles ==="); + "=== vect_analyze_scalar_cycles ===\n"); /* First - identify all inductions. Reduction detection assumes that all the inductions have been identified, therefore, this order must not be @@ -589,6 +607,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) { dump_printf_loc (MSG_NOTE, vect_location, "Analyze phi: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); + dump_printf (MSG_NOTE, "\n"); } /* Skip virtual phi's. The data dependences that are associated with @@ -608,6 +627,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) dump_printf_loc (MSG_NOTE, vect_location, "Access function of PHI: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, access_fn); + dump_printf (MSG_NOTE, "\n"); } STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo) = evolution_part_in_loop_num (access_fn, loop->num); @@ -625,7 +645,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) gcc_assert (STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo) != NULL_TREE); if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "Detected induction."); + dump_printf_loc (MSG_NOTE, vect_location, "Detected induction.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def; } @@ -643,6 +663,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) { dump_printf_loc (MSG_NOTE, vect_location, "Analyze phi: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); + dump_printf (MSG_NOTE, "\n"); } gcc_assert (!virtual_operand_p (def) @@ -657,7 +678,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Detected double reduction."); + "Detected double reduction.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_double_reduction_def; STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) = @@ -669,7 +690,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Detected vectorizable nested cycle."); + "Detected vectorizable nested cycle.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_nested_cycle; STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) = @@ -679,7 +700,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Detected reduction."); + "Detected reduction.\n"); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_reduction_def; STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) = @@ -693,7 +714,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) else if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "Unknown def-use cycle pattern."); + "Unknown def-use cycle pattern.\n"); } worklist.release (); @@ -755,7 +776,7 @@ vect_get_loop_niters (struct loop *loop, tree *number_of_iterations) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== get_loop_niters ==="); + "=== get_loop_niters ===\n"); niters = number_of_exit_cond_executions (loop); if (niters != NULL_TREE @@ -767,6 +788,7 @@ vect_get_loop_niters (struct loop *loop, tree *number_of_iterations) { dump_printf_loc (MSG_NOTE, vect_location, "==> get_loop_niters:"); dump_generic_expr (MSG_NOTE, TDF_SLIM, *number_of_iterations); + dump_printf (MSG_NOTE, "\n"); } } @@ -996,7 +1018,7 @@ vect_analyze_loop_1 (struct loop *loop) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "===== analyze_loop_nest_1 ====="); + "===== analyze_loop_nest_1 =====\n"); /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */ @@ -1005,7 +1027,7 @@ vect_analyze_loop_1 (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad inner-loop form."); + "bad inner-loop form.\n"); return NULL; } @@ -1031,7 +1053,7 @@ vect_analyze_loop_form (struct loop *loop) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== vect_analyze_loop_form ==="); + "=== vect_analyze_loop_form ===\n"); /* Different restrictions apply when we are considering an inner-most loop, vs. an outer (nested) loop. @@ -1055,7 +1077,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: control flow in loop."); + "not vectorized: control flow in loop.\n"); return NULL; } @@ -1063,7 +1085,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: empty loop."); + "not vectorized: empty loop.\n"); return NULL; } } @@ -1093,7 +1115,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: multiple nested loops."); + "not vectorized: multiple nested loops.\n"); return NULL; } @@ -1103,7 +1125,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: Bad inner loop."); + "not vectorized: Bad inner loop.\n"); return NULL; } @@ -1111,8 +1133,9 @@ vect_analyze_loop_form (struct loop *loop) LOOP_VINFO_NITERS (inner_loop_vinfo))) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: inner-loop count not invariant."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: inner-loop count not" + " invariant.\n"); destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; } @@ -1121,7 +1144,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: control flow in loop."); + "not vectorized: control flow in loop.\n"); destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; } @@ -1136,15 +1159,15 @@ vect_analyze_loop_form (struct loop *loop) || single_exit (innerloop)->dest != EDGE_PRED (loop->latch, 0)->src) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: unsupported outerloop form."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: unsupported outerloop form.\n"); destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; } if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Considering outer-loop vectorization."); + "Considering outer-loop vectorization.\n"); } if (!single_exit (loop) @@ -1154,10 +1177,10 @@ vect_analyze_loop_form (struct loop *loop) { if (!single_exit (loop)) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: multiple exits."); + "not vectorized: multiple exits.\n"); else if (EDGE_COUNT (loop->header->preds) != 2) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: too many incoming edges."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: too many incoming edges.\n"); } if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); @@ -1173,7 +1196,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: latch block not empty."); + "not vectorized: latch block not empty.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1187,13 +1210,13 @@ vect_analyze_loop_form (struct loop *loop) { split_loop_exit_edge (e); if (dump_enabled_p ()) - dump_printf (MSG_NOTE, "split exit edge."); + dump_printf (MSG_NOTE, "split exit edge.\n"); } else { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: abnormal loop exit edge."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: abnormal loop exit edge.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1204,8 +1227,8 @@ vect_analyze_loop_form (struct loop *loop) if (!loop_cond) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: complicated exit condition."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: complicated exit condition.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1214,9 +1237,9 @@ vect_analyze_loop_form (struct loop *loop) if (!number_of_iterations) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: number of iterations cannot be " - "computed."); + "computed.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1226,7 +1249,7 @@ vect_analyze_loop_form (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "Infinite number of iterations."); + "Infinite number of iterations.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1239,13 +1262,14 @@ vect_analyze_loop_form (struct loop *loop) dump_printf_loc (MSG_NOTE, vect_location, "Symbolic number of iterations is "); dump_generic_expr (MSG_NOTE, TDF_DETAILS, number_of_iterations); + dump_printf (MSG_NOTE, "\n"); } } else if (tree_to_hwi (number_of_iterations) == 0) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: number of iterations = 0."); + "not vectorized: number of iterations = 0.\n"); if (inner_loop_vinfo) destroy_loop_vec_info (inner_loop_vinfo, true); return NULL; @@ -1293,7 +1317,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== vect_analyze_loop_operations ==="); + "=== vect_analyze_loop_operations ===\n"); gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo)); vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo); @@ -1329,7 +1353,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor; if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Updating vectorization factor to %d ", + "Updating vectorization factor to %d\n", vectorization_factor); } @@ -1347,6 +1371,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { dump_printf_loc (MSG_NOTE, vect_location, "examining phi: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); + dump_printf (MSG_NOTE, "\n"); } /* Inner-loop loop-closed exit phi in outer-loop vectorization @@ -1363,9 +1388,9 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) != vect_double_reduction_def) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "Unsupported loop-closed phi in " - "outer-loop."); + "outer-loop.\n"); return false; } @@ -1384,7 +1409,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) return false; op_def_stmt = SSA_NAME_DEF_STMT (phi_op); - if (!op_def_stmt + if (gimple_nop_p (op_def_stmt) || !flow_bb_inside_loop_p (loop, gimple_bb (op_def_stmt)) || !vinfo_for_stmt (op_def_stmt)) return false; @@ -1406,7 +1431,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) /* FORNOW: not yet supported. */ if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: value used after loop."); + "not vectorized: value used after loop.\n"); return false; } @@ -1415,8 +1440,8 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { /* A scalar-dependence cycle that we don't support. */ if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: scalar dependence cycle."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: scalar dependence cycle.\n"); return false; } @@ -1431,10 +1456,11 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { if (dump_enabled_p ()) { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: relevant phi not " "supported: "); dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, phi, 0); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -1458,18 +1484,18 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "All the computation can be taken out of the loop."); + "All the computation can be taken out of the loop.\n"); if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: redundant loop. no profit to " - "vectorize."); + "vectorize.\n"); return false; } if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) && dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "vectorization_factor = %d, niters = " - HOST_WIDE_INT_PRINT_DEC, vectorization_factor, + HOST_WIDE_INT_PRINT_DEC "\n", vectorization_factor, LOOP_VINFO_INT_NITERS (loop_vinfo)); if ((LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) @@ -1479,11 +1505,11 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: iteration count too small."); + "not vectorized: iteration count too small.\n"); if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: iteration count smaller than " - "vectorization factor."); + "vectorization factor.\n"); return false; } @@ -1501,11 +1527,11 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: vectorization not profitable."); + "not vectorized: vectorization not profitable.\n"); if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: vector version will never be " - "profitable."); + "profitable.\n"); return false; } @@ -1527,12 +1553,12 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: vectorization not profitable."); + "not vectorized: vectorization not profitable.\n"); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "not vectorized: iteration count smaller than user " "specified loop bound parameter or minimum profitable " - "iterations (whichever is more conservative)."); + "iterations (whichever is more conservative).\n"); return false; } @@ -1543,13 +1569,13 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: estimated iteration count too " - "small."); + "small.\n"); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "not vectorized: estimated iteration count smaller " "than specified loop bound parameter or minimum " "profitable iterations (whichever is more " - "conservative)."); + "conservative).\n"); return false; } @@ -1558,19 +1584,19 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo, bool slp) || LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo)) { if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required."); + dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required.\n"); if (!vect_can_advance_ivs_p (loop_vinfo)) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: can't create epilog loop 1."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: can't create epilog loop 1.\n"); return false; } if (!slpeel_can_duplicate_loop_p (loop, single_exit (loop))) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: can't create epilog loop 2."); + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "not vectorized: can't create epilog loop 2.\n"); return false; } } @@ -1603,7 +1629,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data references."); + "bad data references.\n"); return false; } @@ -1615,7 +1641,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data access."); + "bad data access.\n"); return false; } @@ -1633,7 +1659,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unexpected pattern."); + "unexpected pattern.\n"); return false; } @@ -1648,7 +1674,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data dependence."); + "bad data dependence.\n"); return false; } @@ -1657,14 +1683,14 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "can't determine vectorization factor."); + "can't determine vectorization factor.\n"); return false; } if (max_vf < LOOP_VINFO_VECT_FACTOR (loop_vinfo)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data dependence."); + "bad data dependence.\n"); return false; } @@ -1676,7 +1702,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data alignment."); + "bad data alignment.\n"); return false; } @@ -1689,7 +1715,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "too long list of versioning for alias " - "run-time tests."); + "run-time tests.\n"); return false; } @@ -1701,7 +1727,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad data alignment."); + "bad data alignment.\n"); return false; } @@ -1726,7 +1752,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad operation or unsupported loop bound."); + "bad operation or unsupported loop bound.\n"); return false; } @@ -1750,7 +1776,7 @@ vect_analyze_loop (struct loop *loop) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "===== analyze_loop_nest ====="); + "===== analyze_loop_nest =====\n"); if (loop_outer (loop) && loop_vec_info_for_loop (loop_outer (loop)) @@ -1758,7 +1784,7 @@ vect_analyze_loop (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "outer-loop already vectorized."); + "outer-loop already vectorized.\n"); return NULL; } @@ -1770,7 +1796,7 @@ vect_analyze_loop (struct loop *loop) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "bad loop form."); + "bad loop form.\n"); return NULL; } @@ -1851,6 +1877,7 @@ report_vect_op (int msg_type, gimple stmt, const char *msg) { dump_printf_loc (msg_type, vect_location, "%s", msg); dump_gimple_stmt (msg_type, TDF_SLIM, stmt, 0); + dump_printf (msg_type, "\n"); } @@ -2026,6 +2053,7 @@ vect_is_slp_reduction (loop_vec_info loop_info, gimple phi, gimple first_stmt) { dump_printf_loc (MSG_NOTE, vect_location, "swapping oprnds: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, next_stmt, 0); + dump_printf (MSG_NOTE, "\n"); } swap_tree_operands (next_stmt, @@ -2126,7 +2154,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "intermediate value used outside loop."); + "intermediate value used outside loop.\n"); return NULL; } @@ -2138,7 +2166,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduction used in loop."); + "reduction used in loop.\n"); return NULL; } } @@ -2150,6 +2178,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "reduction: not ssa_name: "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, loop_arg); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return NULL; } @@ -2159,14 +2188,17 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduction: no def_stmt."); + "reduction: no def_stmt.\n"); return NULL; } if (!is_gimple_assign (def_stmt) && gimple_code (def_stmt) != GIMPLE_PHI) { if (dump_enabled_p ()) - dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0); + { + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0); + dump_printf (MSG_NOTE, "\n"); + } return NULL; } @@ -2195,7 +2227,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduction used in loop."); + "reduction used in loop.\n"); return NULL; } } @@ -2211,7 +2243,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unsupported phi node definition."); + "unsupported phi node definition.\n"); return NULL; } @@ -2334,6 +2366,7 @@ vect_is_simple_reduction_1 (loop_vec_info loop_info, gimple phi, dump_generic_expr (MSG_NOTE, TDF_SLIM, TREE_TYPE (op4)); } + dump_printf (MSG_NOTE, "\n"); } return NULL; @@ -2591,7 +2624,7 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "cost model: epilogue peel iters set to vf/2 " - "because loop iterations are unknown ."); + "because loop iterations are unknown .\n"); /* If peeled iterations are known but number of scalar loop iterations are unknown, count a taken branch per peeled loop. */ @@ -2649,7 +2682,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, /* Cost model disabled. */ if (!flag_vect_cost_model) { - dump_printf_loc (MSG_NOTE, vect_location, "cost model disabled."); + dump_printf_loc (MSG_NOTE, vect_location, "cost model disabled.\n"); *ret_min_profitable_niters = 0; *ret_min_profitable_estimate = 0; return; @@ -2707,14 +2740,14 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, { peel_iters_prologue = vf/2; dump_printf (MSG_NOTE, "cost model: " - "prologue peel iters set to vf/2."); + "prologue peel iters set to vf/2.\n"); /* If peeling for alignment is unknown, loop bound of main loop becomes unknown. */ peel_iters_epilogue = vf/2; dump_printf (MSG_NOTE, "cost model: " "epilogue peel iters set to vf/2 because " - "peeling for alignment is unknown."); + "peeling for alignment is unknown.\n"); /* If peeled iterations are unknown, count a taken branch and a not taken branch per peeled loop. Even if scalar loop iterations are known, @@ -2884,7 +2917,8 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "cost model: the vector iteration cost = %d " "divided by the scalar iteration cost = %d " - "is greater or equal to the vectorization factor = %d.", + "is greater or equal to the vectorization factor = %d" + ".\n", vec_inside_cost, scalar_single_iter_cost, vf); *ret_min_profitable_niters = -1; *ret_min_profitable_estimate = -1; @@ -2910,9 +2944,10 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, peel_iters_prologue); dump_printf (MSG_NOTE, " epilogue iterations: %d\n", peel_iters_epilogue); - dump_printf (MSG_NOTE, + dump_printf (MSG_NOTE, " Calculated minimum iters for profitability: %d\n", min_profitable_iters); + dump_printf (MSG_NOTE, "\n"); } min_profitable_iters = @@ -2925,7 +2960,8 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - " Runtime profitability threshold = %d\n", min_profitable_iters); + " Runtime profitability threshold = %d\n", + min_profitable_iters); *ret_min_profitable_niters = min_profitable_iters; @@ -3014,6 +3050,7 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code, "unsupported data-type "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, TREE_TYPE (reduction_op)); + dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } return false; } @@ -3082,7 +3119,7 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code, if (dump_enabled_p ()) dump_printf (MSG_NOTE, "vect_model_reduction_cost: inside_cost = %d, " - "prologue_cost = %d, epilogue_cost = %d .", inside_cost, + "prologue_cost = %d, epilogue_cost = %d .\n", inside_cost, prologue_cost, epilogue_cost); return true; @@ -3111,7 +3148,7 @@ vect_model_induction_cost (stmt_vec_info stmt_info, int ncopies) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "vect_model_induction_cost: inside_cost = %d, " - "prologue_cost = %d .", inside_cost, prologue_cost); + "prologue_cost = %d .\n", inside_cost, prologue_cost); } @@ -3133,7 +3170,6 @@ get_initial_def_for_induction (gimple iv_phi) stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); - tree scalar_type; tree vectype; int nunits; edge pe = loop_preheader_edge (loop); @@ -3185,8 +3221,7 @@ get_initial_def_for_induction (gimple iv_phi) gcc_assert (ok); pe = loop_preheader_edge (iv_loop); - scalar_type = TREE_TYPE (init_expr); - vectype = get_vectype_for_scalar_type (scalar_type); + vectype = get_vectype_for_scalar_type (TREE_TYPE (init_expr)); resvectype = get_vectype_for_scalar_type (TREE_TYPE (PHI_RESULT (iv_phi))); gcc_assert (vectype); nunits = TYPE_VECTOR_SUBPARTS (vectype); @@ -3229,8 +3264,11 @@ get_initial_def_for_induction (gimple iv_phi) /* iv_loop is the loop to be vectorized. Create: vec_init = [X, X+S, X+2*S, X+3*S] (S = step_expr, X = init_expr) */ - new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_"); - new_name = force_gimple_operand (init_expr, &stmts, false, new_var); + new_var = vect_get_new_vect_var (TREE_TYPE (vectype), + vect_scalar_var, "var_"); + new_name = force_gimple_operand (fold_convert (TREE_TYPE (vectype), + init_expr), + &stmts, false, new_var); if (stmts) { new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts); @@ -3243,9 +3281,8 @@ get_initial_def_for_induction (gimple iv_phi) for (i = 1; i < nunits; i++) { /* Create: new_name_i = new_name + step_expr */ - enum tree_code code = POINTER_TYPE_P (scalar_type) - ? POINTER_PLUS_EXPR : PLUS_EXPR; - new_name = fold_build2 (code, scalar_type, new_name, step_expr); + new_name = fold_build2 (PLUS_EXPR, TREE_TYPE (new_name), + new_name, step_expr); if (!is_gimple_min_invariant (new_name)) { init_stmt = gimple_build_assign (new_var, new_name); @@ -3258,6 +3295,7 @@ get_initial_def_for_induction (gimple iv_phi) dump_printf_loc (MSG_NOTE, vect_location, "created new init_stmt: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, init_stmt, 0); + dump_printf (MSG_NOTE, "\n"); } constant_p = false; } @@ -3426,6 +3464,7 @@ get_initial_def_for_induction (gimple iv_phi) dump_printf_loc (MSG_NOTE, vect_location, "vector of inductions after inner-loop:"); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, new_stmt, 0); + dump_printf (MSG_NOTE, "\n"); } } } @@ -3439,6 +3478,7 @@ get_initial_def_for_induction (gimple iv_phi) dump_printf (MSG_NOTE, "\n"); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, SSA_NAME_DEF_STMT (vec_def), 0); + dump_printf (MSG_NOTE, "\n"); } STMT_VINFO_VEC_STMT (phi_info) = induction_phi; @@ -3846,6 +3886,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt, dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); dump_printf (MSG_NOTE, "\n"); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, SSA_NAME_DEF_STMT (def), 0); + dump_printf (MSG_NOTE, "\n"); } phi = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (phi)); @@ -4042,7 +4083,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Reduce using direct vector reduction."); + "Reduce using direct vector reduction.\n"); vec_dest = vect_create_destination_var (scalar_dest, vectype); tmp = build1 (reduc_code, vectype, new_phi_result); @@ -4093,7 +4134,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Reduce using vector shifts"); + "Reduce using vector shifts\n"); vec_dest = vect_create_destination_var (scalar_dest, vectype); new_temp = new_phi_result; @@ -4134,7 +4175,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Reduce using scalar code. "); + "Reduce using scalar code.\n"); vec_size_in_bits = tree_to_uhwi (TYPE_SIZE (vectype)); FOR_EACH_VEC_ELT (new_phis, i, new_phi) @@ -4225,7 +4266,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple stmt, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "extract scalar result"); + "extract scalar result\n"); if (BYTES_BIG_ENDIAN) bitpos = size_binop (MULT_EXPR, @@ -4464,6 +4505,7 @@ vect_finalize_reduction: dump_printf_loc (MSG_NOTE, vect_location, "created double reduction phi node: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, vect_phi, 0); + dump_printf (MSG_NOTE, "\n"); } vect_phi_res = PHI_RESULT (vect_phi); @@ -4819,7 +4861,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unsupported condition in reduction"); + "unsupported condition in reduction\n"); return false; } @@ -4835,7 +4877,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, not vectorizable_reduction. */ if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "unsupported shift or rotation."); + "unsupported shift or rotation.\n"); return false; } @@ -4845,7 +4887,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "no optab."); + "no optab.\n"); return false; } @@ -4853,7 +4895,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, if (optab_handler (optab, vec_mode) == CODE_FOR_nothing) { if (dump_enabled_p ()) - dump_printf (MSG_NOTE, "op not supported by target."); + dump_printf (MSG_NOTE, "op not supported by target.\n"); if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD || LOOP_VINFO_VECT_FACTOR (loop_vinfo) @@ -4861,7 +4903,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, return false; if (dump_enabled_p ()) - dump_printf (MSG_NOTE, "proceeding using word mode."); + dump_printf (MSG_NOTE, "proceeding using word mode.\n"); } /* Worthwhile without SIMD support? */ @@ -4871,7 +4913,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not worthwhile without SIMD support."); + "not worthwhile without SIMD support.\n"); return false; } @@ -4952,7 +4994,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "no optab for reduction."); + "no optab for reduction.\n"); epilog_reduc_code = ERROR_MARK; } @@ -4962,7 +5004,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "reduc op not supported by target."); + "reduc op not supported by target.\n"); epilog_reduc_code = ERROR_MARK; } @@ -4973,7 +5015,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "no reduc code for scalar code."); + "no reduc code for scalar code.\n"); return false; } @@ -4983,7 +5025,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "multiple types in double reduction"); + "multiple types in double reduction\n"); return false; } @@ -5002,7 +5044,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "invalid types in dot-prod"); + "invalid types in dot-prod\n"); return false; } @@ -5019,7 +5061,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, /** Transform. **/ if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "transform reduction."); + dump_printf_loc (MSG_NOTE, vect_location, "transform reduction.\n"); /* FORNOW: Multiple types are not supported for condition. */ if (code == COND_EXPR) @@ -5306,7 +5348,7 @@ vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "multiple types in nested loop."); + "multiple types in nested loop.\n"); return false; } @@ -5329,9 +5371,9 @@ vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED, && !STMT_VINFO_LIVE_P (exit_phi_vinfo))) { if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "inner-loop induction only used outside " - "of the outer vectorized loop."); + "of the outer vectorized loop.\n"); return false; } } @@ -5354,7 +5396,7 @@ vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED, STMT_VINFO_TYPE (stmt_info) = induc_vec_info_type; if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== vectorizable_induction ==="); + "=== vectorizable_induction ===\n"); vect_model_induction_cost (stmt_info, ncopies); return true; } @@ -5362,7 +5404,7 @@ vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED, /** Transform. **/ if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "transform induction phi."); + dump_printf_loc (MSG_NOTE, vect_location, "transform induction phi.\n"); vec_def = get_initial_def_for_induction (phi); *vec_stmt = SSA_NAME_DEF_STMT (vec_def); @@ -5462,7 +5504,7 @@ vectorizable_live_operation (gimple stmt, { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "use not simple."); + "use not simple.\n"); return false; } @@ -5501,7 +5543,7 @@ vect_loop_kill_debug_uses (struct loop *loop, gimple stmt) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "killing debug use"); + "killing debug use\n"); gimple_debug_bind_reset_value (ustmt); update_stmt (ustmt); @@ -5542,7 +5584,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) gcov_type expected_iterations = expected_loop_iterations_unbounded (loop); if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "=== vec_transform_loop ==="); + dump_printf_loc (MSG_NOTE, vect_location, "=== vec_transform_loop ===\n"); /* If profile is inprecise, we have chance to fix it up. */ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)) @@ -5561,7 +5603,8 @@ vect_transform_loop (loop_vec_info loop_vinfo) { if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "Profitability threshold is %d loop iterations.", th); + "Profitability threshold is %d loop iterations.\n", + th); check_profitability = true; } @@ -5628,6 +5671,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "------>vectorizing phi: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0); + dump_printf (MSG_NOTE, "\n"); } stmt_info = vinfo_for_stmt (phi); if (!stmt_info) @@ -5643,12 +5687,12 @@ vect_transform_loop (loop_vec_info loop_vinfo) if ((TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info)) != (unsigned HOST_WIDE_INT) vectorization_factor) && dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "multiple-types."); + dump_printf_loc (MSG_NOTE, vect_location, "multiple-types.\n"); if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def) { if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "transform phi."); + dump_printf_loc (MSG_NOTE, vect_location, "transform phi.\n"); vect_transform_stmt (phi, NULL, NULL, NULL, NULL); } } @@ -5678,6 +5722,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) dump_printf_loc (MSG_NOTE, vect_location, "------>vectorizing statement: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0); + dump_printf (MSG_NOTE, "\n"); } stmt_info = vinfo_for_stmt (stmt); @@ -5752,6 +5797,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) "stmt: "); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_def_stmt, 0); + dump_printf (MSG_NOTE, "\n"); } stmt = pattern_def_stmt; @@ -5776,7 +5822,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) /* For SLP VF is set according to unrolling factor, and not to vector size, hence for SLP this print is not valid. */ dump_printf_loc (MSG_NOTE, vect_location, - "multiple-types."); + "multiple-types.\n"); /* SLP. Schedule all the SLP instances when the first SLP stmt is reached. */ @@ -5788,7 +5834,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, - "=== scheduling SLP instances ==="); + "=== scheduling SLP instances ===\n"); vect_schedule_slp (loop_vinfo, NULL); } @@ -5807,7 +5853,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) /* -------- vectorize statement ------------ */ if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, "transform statement."); + dump_printf_loc (MSG_NOTE, vect_location, "transform statement.\n"); grouped_store = false; is_store = vect_transform_stmt (stmt, &si, &grouped_store, NULL, NULL); @@ -5868,5 +5914,6 @@ vect_transform_loop (loop_vec_info loop_vinfo) if (loop->inner) dump_printf_loc (MSG_NOTE, vect_location, "OUTER LOOP VECTORIZED\n"); + dump_printf (MSG_NOTE, "\n"); } } |