From fc49fbc1a1a157818bc3d4381c5d6a71a0674a36 Mon Sep 17 00:00:00 2001 From: steven Date: Tue, 21 Dec 2010 22:58:57 +0000 Subject: * 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 --- gcc/value-prof.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'gcc/value-prof.c') diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 7d6b7ddbb41..414b94887fe 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -47,8 +47,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "pointer-set.h" -static struct value_prof_hooks *value_prof_hooks; - /* In this file value profile based optimizations are placed. Currently the following optimizations are implemented (for more detailed descriptions see comments at value_profile_transformations): @@ -488,7 +486,7 @@ check_counter (gimple stmt, const char * name, /* GIMPLE based transformations. */ -static bool +bool gimple_value_profile_transformations (void) { basic_block bb; @@ -1545,14 +1543,6 @@ stringop_block_profile (gimple stmt, unsigned int *expected_align, } } -struct value_prof_hooks { - /* Find list of values for which we want to measure histograms. */ - void (*find_values_to_profile) (histogram_values *); - - /* Identify and exploit properties of values that are hard to analyze - statically. See value-prof.c for more detail. */ - bool (*value_profile_transformations) (void); -}; /* Find values inside STMT for that we want to measure histograms for division/modulo optimization. */ @@ -1686,7 +1676,7 @@ gimple_values_to_profile (gimple stmt, histogram_values *values) } } -static void +void gimple_find_values_to_profile (histogram_values *values) { basic_block bb; @@ -1743,28 +1733,3 @@ gimple_find_values_to_profile (histogram_values *values) } } -static struct value_prof_hooks gimple_value_prof_hooks = { - gimple_find_values_to_profile, - gimple_value_profile_transformations -}; - -void -gimple_register_value_prof_hooks (void) -{ - gcc_assert (current_ir_type () == IR_GIMPLE); - value_prof_hooks = &gimple_value_prof_hooks; -} - -/* IR-independent entry points. */ -void -find_values_to_profile (histogram_values *values) -{ - (value_prof_hooks->find_values_to_profile) (values); -} - -bool -value_profile_transformations (void) -{ - return (value_prof_hooks->value_profile_transformations) (); -} - -- cgit v1.2.1