diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 11:45:51 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 11:45:51 +0000 |
commit | d297148788686526bc4f9a4b8b1bbaf0c8c96dc9 (patch) | |
tree | 06715d5d420f0cc621f0ca883cf604ecc6862320 /gcc/value-prof.h | |
parent | cb09492adbe1e4187a6b9f80afdb8bc9637543b1 (diff) | |
download | gcc-d297148788686526bc4f9a4b8b1bbaf0c8c96dc9.tar.gz |
* Makefile.in (value-prof.o): New dependencies on $(DIAGNOSTIC_H)
$(TREE_H) and $(COVERAGE_H).
* coverage.c (compute_checksum): Use DECL_NAME not DECL_ASSEMBLER_NAME.
* opts.c (common_handle_option): Enable tree-based value transforms.
* toplev.c (process_options): Ditto.
* value-prof.h (struct histogram_value_t): Redefine. "Adjust" below
refers to references to this type.
* tree-flow.h: (struct stmt_ann_d): Add histograms field.
* rtl-profile.c (rtl_gen_interval_profiler): Adjust. Remove checks
for may_be_more, may_be_less.
(rtl_gen_pow2_profiler): Adjust.
(rtl_gen_one_value_profiler_no_edge_manip): Adjust.
(rtl_gen_one_value_profiler): Adjust.
(rtl_gen_const_delta_profiler): Adjust.
* tree-profile.c (tree_gen_interval_profiler): Implement.
(tree_gen_pow2_profiler): Ditto.
(tree_gen_one_value_profiler): Ditto.
(tree_profiling): New.
(pass_tree_profile): Reference it.
* value-prof.c: Include tree-flow.h, tree-flow-inline.h, diagnostic.h,
tree.h, gcov-io.h.
(insn_divmod_values_to_profile): Rename to
rtl_divmod_values_to_profile. Adjust.
(insn_values_to_profile): Rename to rtl_values_to_profile. Adjust.
(insn_prefetch_values_to_profile): Adjust.
(rtl_value_profile_transformations): Adjust.
(gen_divmod_fixed_value): Rename to rtl_divmod_fixed_value.
(gen_mod_pow2): Rename to rtl_mod_pow2.
(gen_mod_subtract): Rename to rtl_mod_subtract.
(divmod_fixed_value_transform): Rename to
rtl_divmod_fixed_value_transform.
(mod_pow2_value_transform): Rename to rtl_mod_pow2_value_transform.
(mod_subtract_transform): Rename to rtl_mod_subtract_transform.
(rtl_find_values_to_profile): Adjust.
(tree_value_profile_transformations): Implement.
(tree_divmod_values_to_profile): New.
(tree_values_to_profile): New.
(tree_divmod_fixed_value): New.
(tree_mod_pow2): New.
(tree_mod_subtract): New.
(tree_divmod_fixed_value_transform): New.
(tree_mod_pow2_value_transform): New.
(tree_mod_subtract_transform): New.
(tree_find_values_to_profile): Implement.
* profile.c (instrument_values): Free histograms.
(compute_value_histograms): Adjust. Implement tree version.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/value-prof.h')
-rw-r--r-- | gcc/value-prof.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gcc/value-prof.h b/gcc/value-prof.h index b9d0d0663b2..7742de2fab6 100644 --- a/gcc/value-prof.h +++ b/gcc/value-prof.h @@ -38,14 +38,25 @@ enum hist_type ((enum hist_type) ((COUNTER) - GCOV_FIRST_VALUE_COUNTER)) /* The value to measure. */ -/* The void *'s are either rtx or tree, depending on which IR is in use. */ -struct histogram_value_t GTY(()) +struct histogram_value_t { - PTR GTY ((skip (""))) value; /* The value to profile. */ - enum machine_mode mode; /* And its mode. */ - PTR GTY ((skip (""))) seq; /* Insns required to count the - profiled value. */ - PTR GTY ((skip (""))) insn; /* Insn before that to measure. */ + union + { + struct + { + rtx value; /* The value to profile. */ + rtx seq; /* Insns required to count the profiled value. */ + rtx insn; /* Insn before that to measure. */ + enum machine_mode mode; /* Mode of value to profile. */ + } rtl; + struct + { + tree value; /* The value to profile. */ + tree stmt; /* Insn containing the value. */ + gcov_type *counters; /* Pointer to first counter. */ + struct histogram_value_t *next; /* Linked list pointer. */ + } tree; + } hvalue; enum hist_type type; /* Type of information to measure. */ unsigned n_counters; /* Number of required counters. */ union @@ -53,9 +64,7 @@ struct histogram_value_t GTY(()) struct { int int_start; /* First value in interval. */ - int steps; /* Number of values in it. */ - int may_be_less; /* May the value be below? */ - int may_be_more; /* Or above. */ + unsigned int steps; /* Number of values in it. */ } intvl; /* Interval histogram data. */ struct { @@ -66,7 +75,7 @@ struct histogram_value_t GTY(()) typedef struct histogram_value_t *histogram_value; -DEF_VEC_GC_P(histogram_value); +DEF_VEC_MALLOC_P(histogram_value); typedef VEC(histogram_value) *histogram_values; |