diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-21 22:58:57 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-21 22:58:57 +0000 |
commit | fc49fbc1a1a157818bc3d4381c5d6a71a0674a36 (patch) | |
tree | 457d8f8e6a793fbec8f9604b394a356b9b984701 /gcc/profile.c | |
parent | ab1689b1a071703f2e7a8c36cf512446a973d7be (diff) | |
download | gcc-fc49fbc1a1a157818bc3d4381c5d6a71a0674a36.tar.gz |
* value-prof.c (value_prof_hooks): Remove.
(struct value_prof_hooks): Remove.
(gimple_value_prof_hooks): Remove.
(gimple_register_value_prof_hooks): Remove.
(find_values_to_profile): Remove.
(value_profile_transformations): Remove.
(gimple_value_profile_transformations): No longer static.
(gimple_find_values_to_profile): Likewise.
* value-prof.h (gimple_register_value_prof_hooks): Remove prototype.
(find_values_to_profile): Likewise.
(value_profile_transformations): Likewise.
(tree_register_profile_hooks): Likewise.
(struct profile_hooks): Remove.
(tree_profile_hooks): Remove.
(gimple_find_values_to_profile): New protoype.
(gimple_value_profile_transformations): Likewise.
(gimple_init_edge_profiler): Likewise.
(gimple_gen_edge_profiler): Likewise.
(gimple_gen_interval_profiler): Likewise.
(gimple_gen_pow2_profiler): Likewise.
(gimple_gen_one_value_profiler): Likewise.
(gimple_gen_ic_profiler): Likewise.
(gimple_gen_ic_func_profiler): Likewise.
(gimple_gen_const_delta_profiler): Likewise.
(gimple_gen_average_profiler): Likewise.
(gimple_gen_ior_profiler): Likewise.
* profile.c (profile_hooks): Remove.
(instrument_edges): Call profiling functions directly instead
of through removed profile_hooks.
(instrument_values): Likewise.
(branch_prob): Call gimple_find_values_to_profile instead of
removed find_values_to_profile.
Call gimple_init_edge_profiler instead of removed hook.
(tree_register_profile_hooks): Remove.
* tree-profile.c (tree_init_ic_make_global_vars): Rename to
init_ic_make_global_vars.
(tree_init_edge_profiler): Rename to gimple_init_edge_profiler
and no longer static.
(tree_gen_edge_profiler, tree_gen_interval_profiler,
tree_gen_pow2_profiler, tree_gen_one_value_profiler,
tree_gen_ic_profiler, tree_gen_ic_func_profiler,
tree_gen_const_delta_profiler, tree_gen_average_profiler,
tree_gen_ior_profiler): Similarly renamed and no longer static.
(tree_profiling): Do not initialize tree profiling hooks.
(tree_profile_hooks): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168141 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 606e3b2e866..bde8b4677f9 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -72,9 +72,6 @@ along with GCC; see the file COPYING3. If not see #include "profile.h" -/* Hooks for profiling. */ -static struct profile_hooks* profile_hooks; - struct bb_info { unsigned int count_valid : 1; @@ -141,7 +138,7 @@ instrument_edges (struct edge_list *el) fprintf (dump_file, "Edge %d to %d instrumented%s\n", e->src->index, e->dest->index, EDGE_CRITICAL_P (e) ? " (and split)" : ""); - (profile_hooks->gen_edge_profiler) (num_instr_edges++, e); + gimple_gen_edge_profiler (num_instr_edges++, e); } } } @@ -202,31 +199,31 @@ instrument_values (histogram_values values) switch (hist->type) { case HIST_TYPE_INTERVAL: - (profile_hooks->gen_interval_profiler) (hist, t, 0); + gimple_gen_interval_profiler (hist, t, 0); break; case HIST_TYPE_POW2: - (profile_hooks->gen_pow2_profiler) (hist, t, 0); + gimple_gen_pow2_profiler (hist, t, 0); break; case HIST_TYPE_SINGLE_VALUE: - (profile_hooks->gen_one_value_profiler) (hist, t, 0); + gimple_gen_one_value_profiler (hist, t, 0); break; case HIST_TYPE_CONST_DELTA: - (profile_hooks->gen_const_delta_profiler) (hist, t, 0); + gimple_gen_const_delta_profiler (hist, t, 0); break; case HIST_TYPE_INDIR_CALL: - (profile_hooks->gen_ic_profiler) (hist, t, 0); + gimple_gen_ic_profiler (hist, t, 0); break; case HIST_TYPE_AVERAGE: - (profile_hooks->gen_average_profiler) (hist, t, 0); + gimple_gen_average_profiler (hist, t, 0); break; case HIST_TYPE_IOR: - (profile_hooks->gen_ior_profiler) (hist, t, 0); + gimple_gen_ior_profiler (hist, t, 0); break; default: @@ -1170,7 +1167,7 @@ branch_prob (void) #undef BB_TO_GCOV_INDEX if (flag_profile_values) - find_values_to_profile (&values); + gimple_find_values_to_profile (&values); if (flag_branch_probabilities) { @@ -1187,7 +1184,7 @@ branch_prob (void) { unsigned n_instrumented; - profile_hooks->init_edge_profiler (); + gimple_init_edge_profiler (); n_instrumented = instrument_edges (el); @@ -1372,11 +1369,3 @@ end_branch_prob (void) } } -/* Set up hooks to enable tree-based profiling. */ - -void -tree_register_profile_hooks (void) -{ - gcc_assert (current_ir_type () == IR_GIMPLE); - profile_hooks = &tree_profile_hooks; -} |