aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index c4145b3..255f24b 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -357,6 +357,13 @@ tree_ssa_dominator_optimize (void)
SSA_NAME_VALUE (name) = NULL;
}
+ statistics_counter_event (cfun, "Redundant expressions eliminated",
+ opt_stats.num_re);
+ statistics_counter_event (cfun, "Constants propagated",
+ opt_stats.num_const_prop);
+ statistics_counter_event (cfun, "Copies propagated",
+ opt_stats.num_copy_prop);
+
/* Debugging dumps. */
if (dump_file && (dump_flags & TDF_STATS))
dump_dominator_optimization_stats (dump_file);
@@ -868,25 +875,11 @@ record_equivalences_from_incoming_edge (basic_block bb)
void
dump_dominator_optimization_stats (FILE *file)
{
- long n_exprs;
-
fprintf (file, "Total number of statements: %6ld\n\n",
opt_stats.num_stmts);
fprintf (file, "Exprs considered for dominator optimizations: %6ld\n",
opt_stats.num_exprs_considered);
- n_exprs = opt_stats.num_exprs_considered;
- if (n_exprs == 0)
- n_exprs = 1;
-
- fprintf (file, " Redundant expressions eliminated: %6ld (%.0f%%)\n",
- opt_stats.num_re, PERCENT (opt_stats.num_re,
- n_exprs));
- fprintf (file, " Constants propagated: %6ld\n",
- opt_stats.num_const_prop);
- fprintf (file, " Copies propagated: %6ld\n",
- opt_stats.num_copy_prop);
-
fprintf (file, "\nHash table statistics:\n");
fprintf (file, " avail_exprs: ");