The following improves dumping / messages for vectorizer runtime alias checks.
Bootstrap / regtest running on x86_64-unknown-linux-gnu. I'll consider this "documentation" and thus appropriate at this stage. Richard. 2014-02-05 Richard Biener <rguent...@suse.de> * tree-vect-loop.c (vect_analyze_loop_2): Be more informative when not vectorizing because of too many alias checks. * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Add more verboseness, avoid duplicate MSG_MISSED_OPTIMIZATION. Index: gcc/tree-vect-loop.c =================================================================== *** gcc/tree-vect-loop.c (revision 207497) --- gcc/tree-vect-loop.c (working copy) *************** vect_analyze_loop_2 (loop_vec_info loop_ *** 1723,1730 **** { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, ! "too long list of versioning for alias " ! "run-time tests.\n"); return false; } --- 1723,1732 ---- { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, ! "number of versioning for alias " ! "run-time tests exceeds %d " ! "(--param vect-max-version-for-alias-checks)\n", ! PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS)); return false; } Index: gcc/tree-vect-data-refs.c =================================================================== *** gcc/tree-vect-data-refs.c (revision 207497) --- gcc/tree-vect-data-refs.c (working copy) *************** vect_prune_runtime_alias_test_list (loop *** 2901,2906 **** --- 2923,2946 ---- && diff - (HOST_WIDE_INT) TREE_INT_CST_LOW (dr_a1->seg_len) < min_seg_len_b)) { + if (dump_enabled_p ()) + { + dump_printf_loc (MSG_NOTE, vect_location, + "merging ranges for "); + dump_generic_expr (MSG_NOTE, TDF_SLIM, + DR_REF (dr_a1->dr)); + dump_printf (MSG_NOTE, ", "); + dump_generic_expr (MSG_NOTE, TDF_SLIM, + DR_REF (dr_b1->dr)); + dump_printf (MSG_NOTE, " and "); + dump_generic_expr (MSG_NOTE, TDF_SLIM, + DR_REF (dr_a2->dr)); + dump_printf (MSG_NOTE, ", "); + dump_generic_expr (MSG_NOTE, TDF_SLIM, + DR_REF (dr_b2->dr)); + dump_printf (MSG_NOTE, "\n"); + } + dr_a1->seg_len = size_binop (PLUS_EXPR, dr_a2->seg_len, size_int (diff)); comp_alias_ddrs.ordered_remove (i--); *************** vect_prune_runtime_alias_test_list (loop *** 2908,2925 **** } } if ((int) comp_alias_ddrs.length () > PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS)) ! { ! if (dump_enabled_p ()) ! { ! dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, ! "disable versioning for alias - max number of " ! "generated checks exceeded.\n"); ! } ! ! return false; ! } return true; } --- 2948,2959 ---- } } + dump_printf_loc (MSG_NOTE, vect_location, + "improved number of alias checks from %d to %d\n", + may_alias_ddrs.length (), comp_alias_ddrs.length ()); if ((int) comp_alias_ddrs.length () > PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS)) ! return false; return true; }