As part of the review of copy prop for aggregates, it was
mentioned there should be some statistics added, and I noticed
the memcpy->memset was missing the statistics too. So this adds
that.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (optimize_memcpy_to_memset): Adds
statistics when the statement changed.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
tree ctor = build_constructor (TREE_TYPE (dest), NULL);
gimple_assign_set_rhs_from_tree (gsip, ctor);
update_stmt (stmt);
+ statistics_counter_event (cfun, "copy zeroing propagation of aggregate", 1);
}
else /* If stmt is memcpy, transform it into memset. */
{
gimple_call_set_fntype (call, TREE_TYPE (fndecl));
gimple_call_set_arg (call, 1, val);
update_stmt (stmt);
+ statistics_counter_event (cfun, "memcpy to memset changed", 1);
}
if (dump_file && (dump_flags & TDF_DETAILS))