===================================================================
@@ -119,7 +119,7 @@ vectorize_loops (void)
if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOC
&& dump_enabled_p ())
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
- "Vectorized loop\n");
+ "loop vectorized\n");
vect_transform_loop (loop_vinfo);
num_vectorized_loops++;
}
@@ -180,7 +180,7 @@ execute_vect_slp (void)
vect_slp_transform_bb (bb);
if (dump_enabled_p ())
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
- "Vectorized basic-block\n");
+ "Basic block is vectorized\n");
}
}
===================================================================
@@ -225,7 +225,7 @@ report_unroll_peel (struct loop *loop, l
&& !loop->lpt_decision.times)
{
dump_printf_loc (report_flags, locus,
- "Turned loop into non-loop; it never loops.\n");
+ "loop turned into non-loop; it never loops.\n");
return;
}
@@ -236,13 +236,16 @@ report_unroll_peel (struct loop *loop, l
else if (loop->header->count)
niters = expected_loop_iterations (loop);
- dump_printf_loc (report_flags, locus,
- "%s loop %d times",
- (loop->lpt_decision.decision == LPT_PEEL_COMPLETELY
- ? "Completely unroll"
- : (loop->lpt_decision.decision == LPT_PEEL_SIMPLE
- ? "Peel" : "Unroll")),
- loop->lpt_decision.times);
+ if (loop->lpt_decision.decision == LPT_PEEL_COMPLETELY)
+ dump_printf_loc (report_flags, locus,
+ "loop with %d iterations completely unrolled",
+ loop->lpt_decision.times + 1);
+ else
+ dump_printf_loc (report_flags, locus,
+ "loop %s %d times",
+ (loop->lpt_decision.decision == LPT_PEEL_SIMPLE
+ ? "peeled" : "unrolled"),
+ loop->lpt_decision.times);
if (profile_info)
dump_printf (report_flags,
" (header execution count %d",
===================================================================
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3.
#include "dumpfile.h"
#include "gimple-pretty-print.h"
#include "tree.h"
+#include "gimple.h"
/* If non-NULL, return one past-the-end of the matching SUBPART of
the WHOLE string. */
@@ -261,12 +262,20 @@ dump_loc (int dump_kind, FILE *dfile, so
if (dump_kind)
{
if (LOCATION_LOCUS (loc) > BUILTINS_LOCATION)
- fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc),
- LOCATION_LINE (loc));
+ {
+ if (current_function_decl)
+ fprintf (dfile, "\n%s:%d:%s: note: ", LOCATION_FILE (loc),
+ LOCATION_LINE (loc),
+ gimple_decl_printable_name (current_function_decl, 1));
+ else
+ fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc),
+ LOCATION_LINE (loc));
+ }
else if (current_function_decl)
- fprintf (dfile, "\n%s:%d: note: ",
+ fprintf (dfile, "\n%s:%d:%s: note: ",
DECL_SOURCE_FILE (current_function_decl),
- DECL_SOURCE_LINE (current_function_decl));
+ DECL_SOURCE_LINE (current_function_decl),
+ gimple_decl_printable_name (current_function_decl, 1));
}
}
===================================================================
@@ -1,3 +1,13 @@
+2013-08-22 Xinliang David Li <davidxl@google.com>
+
+ * tree-vect-loop-manip.c (vect_do_peeling_for_alignment):
+ Emit alignment peeling message with default -fopt-info.
+ (vect_loop_versioning): Emit loop version info message.
+ * tree-vectorizer.c (vectorize_loops): Minor message
+ change.
+ (execute_vect_slp): Ditto.
+ * dumpfile.c (dump_loc): Add function name in the dump.
+
2013-08-14 Xinliang David Li <davidxl@google.com>
* config/i386/i386.c (ix86_option_override_internal):
===================================================================
@@ -2021,8 +2021,9 @@ vect_do_peeling_for_alignment (loop_vec_
int bound = 0;
if (dump_enabled_p ())
- dump_printf_loc (MSG_NOTE, vect_location,
- "=== vect_do_peeling_for_alignment ===");
+ dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+ "loop peeled for vectorization to enhance"
+ " alignment\n");
initialize_original_copy_tables ();
@@ -2404,6 +2405,8 @@ vect_loop_versioning (loop_vec_info loop
unsigned prob = 4 * REG_BR_PROB_BASE / 5;
gimple_seq gimplify_stmt_list = NULL;
tree scalar_loop_iters = LOOP_VINFO_NITERS (loop_vinfo);
+ bool version_align = LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo);
+ bool version_alias = LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo);
if (check_profitability)
{
@@ -2413,11 +2416,11 @@ vect_loop_versioning (loop_vec_info loop
is_gimple_condexpr, NULL_TREE);
}
- if (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo))
+ if (version_align)
vect_create_cond_for_align_checks (loop_vinfo, &cond_expr,
&cond_expr_stmt_list);
- if (LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo))
+ if (version_alias)
vect_create_cond_for_alias_checks (loop_vinfo, &cond_expr);
cond_expr = force_gimple_operand_1 (cond_expr, &gimplify_stmt_list,
@@ -2427,6 +2430,20 @@ vect_loop_versioning (loop_vec_info loop
initialize_original_copy_tables ();
loop_version (loop, cond_expr, &condition_bb,
prob, prob, REG_BR_PROB_BASE - prob, true);
+
+ if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOC
+ && dump_enabled_p ())
+ {
+ if (version_alias)
+ dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+ "loop versioned for vectorization because of "
+ "possible aliasing\n");
+ if (version_align)
+ dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+ "loop versioned for vectorization to enhance "
+ "alignment\n");
+
+ }
free_original_copy_tables();
/* Loop versioning violates an assumption we try to maintain during
===================================================================
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3.
#include "tree-scalar-evolution.h"
#include "tree-vectorizer.h"
#include "diagnostic-core.h"
-
+#include <stdlib.h>
/* Need to include rtl.h, expr.h, etc. for optabs. */
#include "expr.h"
#include "optabs.h"
@@ -1393,6 +1393,8 @@ vect_enhance_data_refs_alignment (loop_v
supportable_dr_alignment = vect_supportable_dr_alignment (dr, true);
do_peeling = vector_alignment_reachable_p (dr);
+ if (getenv("NOPEEL"))
+ do_peeling = false;
if (do_peeling)
{
if (known_alignment_for_access_p (dr))
===================================================================
@@ -870,11 +870,12 @@ try_unroll_loop_completely (struct loop
{
if (!n_unroll)
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS, locus,
- "Turned loop into non-loop; it never loops.\n");
+ "loop turned into non-loop; it never loops.\n");
else
{
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS, locus,
- "Completely unroll loop %d times", (int)n_unroll);
+ "loop with %d iterations completely unrolled",
+ (int) (n_unroll + 1));
if (profile_info)
dump_printf (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS,
" (header execution count %d)",