From: Martin Liska Date: Mon, 26 Sep 2016 11:04:18 +0000 (+0200) Subject: Remove HIST_TYPE_CONST_DELTA counter type (PR gcov-profile/23332) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3282420874458112fcf9c8664548ffc27613ccb7;p=gcc.git Remove HIST_TYPE_CONST_DELTA counter type (PR gcov-profile/23332) PR gcov-profile/23332 * profile.c (instrument_values): Do not handle HIST_TYPE_CONST_DELTA. * tree-profile.c (gimple_gen_const_delta_profiler): Remove. * value-prof.c (dump_histogram_value): Do not handle HIST_TYPE_CONST_DELTA. (stream_in_histogram_value): Likewise. (gimple_find_values_to_profile): Likewise. * value-prof.h (enum hist_type): Likewise. From-SVN: r240492 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a46910dfeef..d796a592e9b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2016-09-26 Martin Liska + + PR gcov-profile/23332 + * profile.c (instrument_values): Do not handle + HIST_TYPE_CONST_DELTA. + * tree-profile.c (gimple_gen_const_delta_profiler): + Remove. + * value-prof.c (dump_histogram_value): Do not handle + HIST_TYPE_CONST_DELTA. + (stream_in_histogram_value): Likewise. + (gimple_find_values_to_profile): Likewise. + * value-prof.h (enum hist_type): Likewise. + 2016-09-26 Martin Liska * common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN diff --git a/gcc/profile.c b/gcc/profile.c index 4519e7d8558..791225b106d 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -179,10 +179,6 @@ instrument_values (histogram_values values) gimple_gen_one_value_profiler (hist, t, 0); break; - case HIST_TYPE_CONST_DELTA: - gimple_gen_const_delta_profiler (hist, t, 0); - break; - case HIST_TYPE_INDIR_CALL: case HIST_TYPE_INDIR_CALL_TOPN: gimple_gen_ic_profiler (hist, t, 0); diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 69b48e59be4..1f45b995d0f 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -471,22 +471,6 @@ gimple_gen_time_profiler (unsigned tag, unsigned base, gsi_insert_before (&gsi, call, GSI_NEW_STMT); } -/* Output instructions as GIMPLE trees for code to find the most common value - of a difference between two evaluations of an expression. - VALUE is the expression whose value is profiled. TAG is the tag of the - section for counters, BASE is offset of the counter position. */ - -void -gimple_gen_const_delta_profiler (histogram_value value ATTRIBUTE_UNUSED, - unsigned tag ATTRIBUTE_UNUSED, - unsigned base ATTRIBUTE_UNUSED) -{ - /* FIXME implement this. */ - if (flag_checking) - internal_error ("unimplemented functionality"); - gcc_unreachable (); -} - /* Output instructions as GIMPLE trees to increment the average histogram counter. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position. */ diff --git a/gcc/value-prof.c b/gcc/value-prof.c index a4653aa8ee9..e794e6d5aef 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -95,12 +95,6 @@ along with GCC; see the file COPYING3. If not see Limitations / FIXME / TODO: * Only one histogram of each type can be associated with a statement. - * Currently, HIST_TYPE_CONST_DELTA is not implemented. - (This type of histogram was originally used to implement a form of - stride profiling based speculative prefetching to improve SPEC2000 - scores for memory-bound benchmarks, mcf and equake. However, this - was an RTL value-profiling transformation, and those have all been - removed.) * Some value profile transformations are done in builtins.c (?!) * Updating of histograms needs some TLC. * The value profiling code could be used to record analysis results @@ -306,19 +300,6 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) fprintf (dump_file, ".\n"); break; - case HIST_TYPE_CONST_DELTA: - fprintf (dump_file, "Constant delta "); - if (hist->hvalue.counters) - { - fprintf (dump_file, "value:%" PRId64 - " match:%" PRId64 - " wrong:%" PRId64, - (int64_t) hist->hvalue.counters[0], - (int64_t) hist->hvalue.counters[1], - (int64_t) hist->hvalue.counters[2]); - } - fprintf (dump_file, ".\n"); - break; case HIST_TYPE_INDIR_CALL: fprintf (dump_file, "Indirect call "); if (hist->hvalue.counters) @@ -426,10 +407,6 @@ stream_in_histogram_value (struct lto_input_block *ib, gimple *stmt) ncounters = 3; break; - case HIST_TYPE_CONST_DELTA: - ncounters = 4; - break; - case HIST_TYPE_IOR: case HIST_TYPE_TIME_PROFILE: ncounters = 1; @@ -2080,10 +2057,6 @@ gimple_find_values_to_profile (histogram_values *values) hist->n_counters = 3; break; - case HIST_TYPE_CONST_DELTA: - hist->n_counters = 4; - break; - case HIST_TYPE_INDIR_CALL: hist->n_counters = 3; break; diff --git a/gcc/value-prof.h b/gcc/value-prof.h index d426d832854..07e2b3b5840 100644 --- a/gcc/value-prof.h +++ b/gcc/value-prof.h @@ -28,8 +28,6 @@ enum hist_type HIST_TYPE_POW2, /* Histogram of power of 2 values. */ HIST_TYPE_SINGLE_VALUE, /* Tries to identify the value that is (almost) always constant. */ - HIST_TYPE_CONST_DELTA, /* Tries to identify the (almost) always constant - difference between two evaluations of a value. */ HIST_TYPE_INDIR_CALL, /* Tries to identify the function that is (almost) called in indirect call */ HIST_TYPE_AVERAGE, /* Compute average value (sum of all values). */ @@ -107,8 +105,6 @@ extern void gimple_gen_ic_profiler (histogram_value, unsigned, unsigned); extern void gimple_gen_ic_func_profiler (void); extern void gimple_gen_time_profiler (unsigned, unsigned, gimple_stmt_iterator &); -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); extern void stream_out_histogram_value (struct output_block *, histogram_value);