From 75d56f7882d1bc40f7c638462bb6fec3b84c3732 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 23 Sep 2016 10:27:11 +0200
Subject: [PATCH] Remove HIST_TYPE_CONST_DELTA counter type (PR
gcov-profile/23332).
gcc/ChangeLog:
2016-09-23 Martin Liska <mliska@suse.cz>
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.
---
gcc/profile.c | 4 ----
gcc/tree-profile.c | 16 ----------------
gcc/value-prof.c | 27 ---------------------------
gcc/value-prof.h | 4 ----
4 files changed, 51 deletions(-)
@@ -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);
@@ -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. */
@@ -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;
@@ -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);
--
2.9.2