gcc_assert (num_iterations < 50);
}
- if (dump_file && (dump_flags & TDF_STATS))
- fprintf (dump_file, "compute_antic required %d iterations\n",
- num_iterations);
+ statistics_histogram_event (cfun, "compute_antic iterations",
+ num_iterations);
if (do_partial_partial)
{
/* Theoretically possible, but *highly* unlikely. */
gcc_assert (num_iterations < 50);
}
- if (dump_file && (dump_flags & TDF_STATS))
- fprintf (dump_file, "compute_partial_antic required %d iterations\n",
- num_iterations);
+ statistics_histogram_event (cfun, "compute_partial_antic iterations",
+ num_iterations);
}
sbitmap_free (has_abnormal_preds);
sbitmap_free (changed_blocks);
{
tree call = get_call_expr_in (stmt);
- if (call_expr_flags (call) & (ECF_PURE | ECF_CONST))
+ if (call_expr_flags (call) & (ECF_PURE | ECF_CONST))
return true;
return false;
}
new_stuff = false;
new_stuff = insert_aux (ENTRY_BLOCK_PTR);
}
- if (num_iterations > 2 && dump_file && (dump_flags & TDF_STATS))
- fprintf (dump_file, "insert required %d iterations\n", num_iterations);
+ statistics_histogram_event (cfun, "insert iterations", num_iterations);
}
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs))
|| is_gimple_min_invariant (rhs)
|| TREE_CODE (rhs) == ADDR_EXPR
- || TREE_INVARIANT (rhs)
|| DECL_P (rhs))
{
/* Remove all the redundant expressions. */
todo |= eliminate ();
- if (dump_file && (dump_flags & TDF_STATS))
- {
- fprintf (dump_file, "Insertions: %d\n", pre_stats.insertions);
- fprintf (dump_file, "PA inserted: %d\n", pre_stats.pa_insert);
- fprintf (dump_file, "New PHIs: %d\n", pre_stats.phis);
- fprintf (dump_file, "Eliminated: %d\n", pre_stats.eliminations);
- fprintf (dump_file, "Constified: %d\n", pre_stats.constified);
- }
+ statistics_counter_event (cfun, "Insertions", pre_stats.insertions);
+ statistics_counter_event (cfun, "PA inserted", pre_stats.pa_insert);
+ statistics_counter_event (cfun, "New PHIs", pre_stats.phis);
+ statistics_counter_event (cfun, "Eliminated", pre_stats.eliminations);
+ statistics_counter_event (cfun, "Constified", pre_stats.constified);
bsi_commit_edge_inserts ();
clear_expression_ids ();
return flag_tree_pre != 0;
}
-struct tree_opt_pass pass_pre =
+struct gimple_opt_pass pass_pre =
{
+ {
+ GIMPLE_PASS,
"pre", /* name */
gate_pre, /* gate */
do_pre, /* execute */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_update_ssa_only_virtuals | TODO_dump_func | TODO_ggc_collect
- | TODO_verify_ssa, /* todo_flags_finish */
- 0 /* letter */
+ | TODO_verify_ssa /* todo_flags_finish */
+ }
};
return flag_tree_fre != 0;
}
-struct tree_opt_pass pass_fre =
+struct gimple_opt_pass pass_fre =
{
+ {
+ GIMPLE_PASS,
"fre", /* name */
gate_fre, /* gate */
execute_fre, /* execute */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa, /* todo_flags_finish */
- 0 /* letter */
+ TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+ }
};