From 8a76829ccfe1b5cb484f79a8b7ba02299f228782 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 28 Jul 2005 23:48:38 +0200 Subject: Makefile.in (rtl-profile.o): Kill all traces of it. * Makefile.in (rtl-profile.o): Kill all traces of it. * common.opt (fspeculative-prefetching, ftree-based-profiling): Kill. * coverage.h (rtl_coverage_counter_ref): Kill. * opts.c (flag_speculative_prefetching_set): Kill. (flag_loop_optimize_set): New. (common_handle_option): Disable loop optimizer when profiling; do not handle speculative prefetching. * passes.c (init_optimization_passes): Replace pass_profiling combo by branch_prob pass. * profile.c (compute_value_histograms): Update for simplified value profiles. (rtl_register_profile_hooks): Kill. (pass_profiling): Kill. (rest_of_handle_branch_prob): Do not profile. * toplev.c (process_options): Remove speculative prefetching. * toplev.h (flag_tree_based_profiling): Kill. * tree-profile.c (prepare_instrumented_value, tree_gen_interval_profiler, tree_gen_pow2_profiler, tree_gen_one_value_profiler, do_tree_profiling): Update for simplified datastructures. * value-prof.c: Add comment that speculative prefetching was dropped; update rest of file for simplified datastructures. (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX, rtl_divmod_values_to_profile, insn_prefetch_values_to_profile, find_mem_reference_1, find_mem_reference_2, find_mem_reference, rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2, rtl_mod_subtract, gen_speculative_prefetch, rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform, rtl_mod_subtract_transform, speculative_prefetching_transform): Kill. (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): Kill. * value-prof.h (histogram_value_t): Remove IL based unions. (rtl_register_value_prof_hooks, rtl_register_profile_hooks, rtl_profile_hooks): Remove hooks. * invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill. * inliner-1.c: Do not dump everything. * tree-prof.exp: Do not pass -ftree-based-profiling. * bprob.exp: Likewise. From-SVN: r102522 --- gcc/profile.c | 79 ++++++++--------------------------------------------------- 1 file changed, 10 insertions(+), 69 deletions(-) (limited to 'gcc/profile.c') diff --git a/gcc/profile.c b/gcc/profile.c index 1e0c3b87d93..113927fd44a 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -651,7 +651,7 @@ compute_value_histograms (histogram_values values) gcov_type *histogram_counts[GCOV_N_VALUE_COUNTERS]; gcov_type *act_count[GCOV_N_VALUE_COUNTERS]; gcov_type *aact_count; - histogram_value hist; + histogram_value hist = 0; for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++) n_histogram_counters[t] = 0; @@ -683,7 +683,8 @@ compute_value_histograms (histogram_values values) for (i = 0; i < VEC_length (histogram_value, values); i++) { - rtx hist_list = NULL_RTX; + tree stmt = hist->hvalue.stmt; + stmt_ann_t ann = get_stmt_ann (stmt); hist = VEC_index (histogram_value, values, i); t = (int) hist->type; @@ -691,29 +692,12 @@ compute_value_histograms (histogram_values values) aact_count = act_count[t]; act_count[t] += hist->n_counters; - if (!ir_type ()) - { - for (j = hist->n_counters; j > 0; j--) - hist_list = alloc_EXPR_LIST (0, GEN_INT (aact_count[j - 1]), - hist_list); - hist_list = alloc_EXPR_LIST (0, - copy_rtx (hist->hvalue.rtl.value), hist_list); - hist_list = alloc_EXPR_LIST (0, GEN_INT (hist->type), hist_list); - REG_NOTES (hist->hvalue.rtl.insn) = - alloc_EXPR_LIST (REG_VALUE_PROFILE, hist_list, - REG_NOTES (hist->hvalue.rtl.insn)); - } - else - { - tree stmt = hist->hvalue.tree.stmt; - stmt_ann_t ann = get_stmt_ann (stmt); - hist->hvalue.tree.next = ann->histograms; - ann->histograms = hist; - hist->hvalue.tree.counters = - xmalloc (sizeof (gcov_type) * hist->n_counters); - for (j = 0; j < hist->n_counters; j++) - hist->hvalue.tree.counters[j] = aact_count[j]; - } + hist->hvalue.next = ann->histograms; + ann->histograms = hist; + hist->hvalue.counters = + xmalloc (sizeof (gcov_type) * hist->n_counters); + for (j = 0; j < hist->n_counters; j++) + hist->hvalue.counters[j] = aact_count[j]; } for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++) @@ -1324,55 +1308,13 @@ tree_register_profile_hooks (void) profile_hooks = &tree_profile_hooks; } -/* Set up hooks to enable RTL-based profiling. */ - -void -rtl_register_profile_hooks (void) -{ - gcc_assert (!ir_type ()); - profile_hooks = &rtl_profile_hooks; -} -static bool -gate_handle_profiling (void) -{ - return optimize > 0 - || (!flag_tree_based_profiling - && (profile_arc_flag || flag_test_coverage - || flag_branch_probabilities)); -} - -struct tree_opt_pass pass_profiling = -{ - NULL, /* name */ - gate_handle_profiling, /* gate */ - NULL, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - 0, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0, /* todo_flags_finish */ - 0 /* letter */ -}; - - /* Do branch profiling and static profile estimation passes. */ static void rest_of_handle_branch_prob (void) { struct loops loops; - rtl_register_profile_hooks (); - rtl_register_value_prof_hooks (); - - if ((profile_arc_flag || flag_test_coverage || flag_branch_probabilities) - && !flag_tree_based_profiling) - branch_prob (); - /* Discover and record the loop depth at the head of each basic block. The loop infrastructure does the real job for us. */ flow_loops_find (&loops); @@ -1382,8 +1324,7 @@ rest_of_handle_branch_prob (void) /* Estimate using heuristics if no profiling info is available. */ if (flag_guess_branch_prob - && (profile_status == PROFILE_ABSENT - || (profile_status == PROFILE_READ && !flag_tree_based_profiling))) + && profile_status == PROFILE_ABSENT) estimate_probability (&loops); flow_loops_free (&loops); -- cgit v1.2.1