summaryrefslogtreecommitdiff
path: root/gcc/value-prof.h
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-21 22:58:57 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-21 22:58:57 +0000
commitfc49fbc1a1a157818bc3d4381c5d6a71a0674a36 (patch)
tree457d8f8e6a793fbec8f9604b394a356b9b984701 /gcc/value-prof.h
parentab1689b1a071703f2e7a8c36cf512446a973d7be (diff)
downloadgcc-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/value-prof.h')
-rw-r--r--gcc/value-prof.h58
1 files changed, 16 insertions, 42 deletions
diff --git a/gcc/value-prof.h b/gcc/value-prof.h
index 907cd785600..abd91706ca7 100644
--- a/gcc/value-prof.h
+++ b/gcc/value-prof.h
@@ -40,6 +40,7 @@ enum hist_type
#define HIST_TYPE_FOR_COUNTER(COUNTER) \
((enum hist_type) ((COUNTER) - GCOV_FIRST_VALUE_COUNTER))
+
/* The value to measure. */
struct histogram_value_t
{
@@ -70,44 +71,8 @@ DEF_VEC_ALLOC_P(histogram_value,heap);
typedef VEC(histogram_value,heap) *histogram_values;
-/* Hooks registration. */
-extern void gimple_register_value_prof_hooks (void);
-
-/* IR-independent entry points. */
-extern void find_values_to_profile (histogram_values *);
-extern bool value_profile_transformations (void);
-
-/* External declarations for edge-based profiling. */
-struct profile_hooks {
-
- /* Insert code to initialize edge profiler. */
- void (*init_edge_profiler) (void);
-
- /* Insert code to increment an edge count. */
- void (*gen_edge_profiler) (int, edge);
-
- /* Insert code to increment the interval histogram counter. */
- void (*gen_interval_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to increment the power of two histogram counter. */
- void (*gen_pow2_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to find the most common value. */
- void (*gen_one_value_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to find the most common value of a difference between two
- evaluations of an expression. */
- void (*gen_const_delta_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to find the most common indirect call */
- void (*gen_ic_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to find the average value of an expression. */
- void (*gen_average_profiler) (histogram_value, unsigned, unsigned);
-
- /* Insert code to ior value of an expression. */
- void (*gen_ior_profiler) (histogram_value, unsigned, unsigned);
-};
+extern void gimple_find_values_to_profile (histogram_values *);
+extern bool gimple_value_profile_transformations (void);
histogram_value gimple_histogram_value (struct function *, gimple);
histogram_value gimple_histogram_value_of_type (struct function *, gimple,
@@ -123,14 +88,23 @@ void verify_histograms (void);
void free_histograms (void);
void stringop_block_profile (gimple, unsigned int *, HOST_WIDE_INT *);
+/* In tree-profile.c. */
+extern void gimple_init_edge_profiler (void);
+extern void gimple_gen_edge_profiler (int, edge);
+extern void gimple_gen_interval_profiler (histogram_value, unsigned, unsigned);
+extern void gimple_gen_pow2_profiler (histogram_value, unsigned, unsigned);
+extern void gimple_gen_one_value_profiler (histogram_value, unsigned, unsigned);
+extern void gimple_gen_ic_profiler (histogram_value, unsigned, unsigned);
+extern void gimple_gen_ic_func_profiler (void);
+extern void gimple_gen_const_delta_profiler (histogram_value,
+ unsigned, unsigned);
+extern void gimple_gen_average_profiler (histogram_value, unsigned, unsigned);
+extern void gimple_gen_ior_profiler (histogram_value, unsigned, unsigned);
+
/* In profile.c. */
extern void init_branch_prob (void);
extern void branch_prob (void);
extern void end_branch_prob (void);
-extern void tree_register_profile_hooks (void);
-
-/* In tree-profile.c. */
-extern struct profile_hooks tree_profile_hooks;
#endif /* GCC_VALUE_PROF_H */