https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90944
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is moving over to statistics_counter_event instead of manually printing
out things.
Something like (NOTE this is not tested; just written on the fly and there
might be better ways of counting when combine_attempts was incremented instead
of having a variable):
diff --git a/gcc/combine.c b/gcc/combine.c
index ce7aeec..c63f9f9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1557,6 +1557,11 @@ retry:
total_extras += combine_extras;
total_successes += combine_successes;
+ statistics_counter_event (cfun, "attempts", combine_attempts);
+ statistics_counter_event (cfun, "merges", combine_merges);
+ statistics_counter_event (cfun, "requiring new space", combine_extras);
+ statistics_counter_event (cfun, "successes", combine_successes);
+
nonzero_sign_valid = 0;
rtl_hooks = general_rtl_hooks;
@@ -15004,10 +15009,6 @@ dump_combine_stats (FILE *file)
void
dump_combine_total_stats (FILE *file)
{
- fprintf
- (file,
- "\n;; Combiner totals: %d attempts, %d substitutions (%d requiring new
space),\n;; %d successes.\n",
- total_attempts, total_merges, total_extras, total_successes);
}
^L
/* Make pseudo-to-pseudo copies after every hard-reg-to-pseudo-copy, because