static int combine_successes;
-/* Totals over entire compilation. */
-
-static int total_attempts, total_merges, total_extras, total_successes;
-
/* combine_instructions may try to replace the right hand side of the
second instruction with the value of an associated REG_EQUAL note
before throwing it at try_combine. That is problematic when there
undobuf.frees = 0;
}
- total_attempts += combine_attempts;
- total_merges += combine_merges;
- 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, "extras", combine_extras);
+ statistics_counter_event (cfun, "successes", combine_successes);
nonzero_sign_valid = 0;
rtl_hooks = general_rtl_hooks;
return false;
}
\f
-DEBUG_FUNCTION void
-dump_combine_stats (FILE *file)
-{
- fprintf
- (file,
- ";; Combiner statistics: %d attempts, %d substitutions (%d requiring new space),\n;; %d successes.\n\n",
- combine_attempts, combine_merges, combine_extras, combine_successes);
-}
-
-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);
-}
-\f
/* Make pseudo-to-pseudo copies after every hard-reg-to-pseudo-copy, because
the reg-to-reg copy can usefully combine with later instructions, but we
do not want to combine the hard reg into later instructions, for that
auto_dump_scope scope (NAME, USER_LOC)
extern void dump_function (int phase, tree fn);
-extern void print_combine_total_stats (void);
extern bool enable_rtl_dump_file (void);
/* In tree-dump.cc */
extern void dump_node (const_tree, dump_flags_t, FILE *);
-/* In combine.cc */
-extern void dump_combine_total_stats (FILE *);
/* In cfghooks.cc */
extern void dump_bb (FILE *, basic_block, int, dump_flags_t);
dumps->dump_finish (pass_profile_1->static_pass_number);
}
- if (optimize > 0)
- {
- dumps->dump_start (pass_combine_1->static_pass_number, NULL);
- print_combine_total_stats ();
- dumps->dump_finish (pass_combine_1->static_pass_number);
- }
-
/* Do whatever is necessary to finish printing the graphs. */
for (i = TDI_end; (dfi = dumps->get_dump_file_info (i)) != NULL; ++i)
if (dfi->graph_dump_initialized)
/* In combine.cc */
extern unsigned int extended_count (const_rtx, machine_mode, int);
extern rtx remove_death (unsigned int, rtx_insn *);
-extern void dump_combine_stats (FILE *);
-extern void dump_combine_total_stats (FILE *);
extern rtx make_compound_operation (rtx, enum rtx_code);
/* In sched-rgn.cc. */