aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-prof.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-08-01 12:50:48 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-08-01 10:50:48 +0000
commit7f87c8dae2a7d4447bef7686c92d8e896edabe6a (patch)
treecc5fb4141889a6ceb5fa7b8af4eaaec20479e536 /gcc/value-prof.c
parentfd2e1dcd253d34aeca751518970c20cc3e9a8716 (diff)
downloadgcc-7f87c8dae2a7d4447bef7686c92d8e896edabe6a.zip
gcc-7f87c8dae2a7d4447bef7686c92d8e896edabe6a.tar.gz
gcc-7f87c8dae2a7d4447bef7686c92d8e896edabe6a.tar.bz2
Improve dumping of value profiling transformations.
2018-08-01 Martin Liska <mliska@suse.cz> * value-prof.c (gimple_divmod_fixed_value_transform): Unify format how successful transformation is dumped. (gimple_mod_pow2_value_transform): Likewise. (gimple_mod_subtract_transform): Likewise. (gimple_stringops_transform): Likewise. 2018-08-01 Martin Liska <mliska@suse.cz> * gcc.dg/tree-prof/stringop-1.c: Adjust scanned pattern. * gcc.dg/tree-prof/stringop-2.c: Likewise. * gcc.dg/tree-prof/val-prof-1.c: Likewise. * gcc.dg/tree-prof/val-prof-2.c: Likewise. * gcc.dg/tree-prof/val-prof-3.c: Likewise. * gcc.dg/tree-prof/val-prof-4.c: Likewise. * gcc.dg/tree-prof/val-prof-5.c: Likewise. * gcc.dg/tree-prof/val-prof-7.c: Likewise. From-SVN: r263203
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r--gcc/value-prof.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index a7c4be7..29489e0 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -821,12 +821,9 @@ gimple_divmod_fixed_value_transform (gimple_stmt_iterator *si)
if (dump_file)
{
- fprintf (dump_file, "Div/mod by constant ");
- print_generic_expr (dump_file, value, TDF_SLIM);
- fprintf (dump_file, "=");
+ fprintf (dump_file, "Transformation done: div/mod by constant ");
print_generic_expr (dump_file, tree_val, TDF_SLIM);
- fprintf (dump_file, " transformation on insn ");
- print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
+ fprintf (dump_file, "\n");
}
gimple_assign_set_rhs_from_tree (si, result);
@@ -956,18 +953,15 @@ gimple_mod_pow2_value_transform (gimple_stmt_iterator *si)
|| optimize_bb_for_size_p (gimple_bb (stmt)))
return false;
- if (dump_file)
- {
- fprintf (dump_file, "Mod power of 2 transformation on insn ");
- print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
- }
-
/* Compute probability of taking the optimal path. */
all = count + wrong_values;
if (check_counter (stmt, "pow2", &count, &all, gimple_bb (stmt)->count))
return false;
+ if (dump_file)
+ fprintf (dump_file, "Transformation done: mod power of 2\n");
+
if (all > 0)
prob = profile_probability::probability_in_gcov_type (count, all);
else
@@ -1151,10 +1145,7 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si)
gimple_remove_histogram_value (cfun, stmt, histogram);
if (dump_file)
- {
- fprintf (dump_file, "Mod subtract transformation on insn ");
- print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
- }
+ fprintf (dump_file, "Transformation done: mod subtract\n");
/* Compute probability of taking the optimal path(s). */
if (all > 0)
@@ -1742,11 +1733,9 @@ gimple_stringops_transform (gimple_stmt_iterator *gsi)
}
if (dump_file)
- {
- fprintf (dump_file, "Single value %i stringop transformation on ",
- (int)val);
- print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
- }
+ fprintf (dump_file,
+ "Transformation done: single value %i stringop for %s\n",
+ (int)val, built_in_names[(int)fcode]);
gimple_stringop_fixed_value (stmt, tree_val, prob, count, all);