Commit 32824208 by Martin Liska Committed by Martin Liska

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
parent 5cc6c41c
2016-09-26 Martin Liska <mliska@suse.cz> 2016-09-26 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.
2016-09-26 Martin Liska <mliska@suse.cz>
* common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN * common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN
from default sanitize recover values. from default sanitize recover values.
* doc/invoke.texi: Fix documentation related to -fsanitize=leak, * doc/invoke.texi: Fix documentation related to -fsanitize=leak,
......
...@@ -179,10 +179,6 @@ instrument_values (histogram_values values) ...@@ -179,10 +179,6 @@ instrument_values (histogram_values values)
gimple_gen_one_value_profiler (hist, t, 0); gimple_gen_one_value_profiler (hist, t, 0);
break; 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:
case HIST_TYPE_INDIR_CALL_TOPN: case HIST_TYPE_INDIR_CALL_TOPN:
gimple_gen_ic_profiler (hist, t, 0); gimple_gen_ic_profiler (hist, t, 0);
......
...@@ -471,22 +471,6 @@ gimple_gen_time_profiler (unsigned tag, unsigned base, ...@@ -471,22 +471,6 @@ gimple_gen_time_profiler (unsigned tag, unsigned base,
gsi_insert_before (&gsi, call, GSI_NEW_STMT); 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 /* Output instructions as GIMPLE trees to increment the average histogram
counter. VALUE is the expression whose value is profiled. TAG is the 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. */ 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 ...@@ -95,12 +95,6 @@ along with GCC; see the file COPYING3. If not see
Limitations / FIXME / TODO: Limitations / FIXME / TODO:
* Only one histogram of each type can be associated with a statement. * 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 (?!) * Some value profile transformations are done in builtins.c (?!)
* Updating of histograms needs some TLC. * Updating of histograms needs some TLC.
* The value profiling code could be used to record analysis results * The value profiling code could be used to record analysis results
...@@ -306,19 +300,6 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) ...@@ -306,19 +300,6 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
fprintf (dump_file, ".\n"); fprintf (dump_file, ".\n");
break; 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: case HIST_TYPE_INDIR_CALL:
fprintf (dump_file, "Indirect call "); fprintf (dump_file, "Indirect call ");
if (hist->hvalue.counters) if (hist->hvalue.counters)
...@@ -426,10 +407,6 @@ stream_in_histogram_value (struct lto_input_block *ib, gimple *stmt) ...@@ -426,10 +407,6 @@ stream_in_histogram_value (struct lto_input_block *ib, gimple *stmt)
ncounters = 3; ncounters = 3;
break; break;
case HIST_TYPE_CONST_DELTA:
ncounters = 4;
break;
case HIST_TYPE_IOR: case HIST_TYPE_IOR:
case HIST_TYPE_TIME_PROFILE: case HIST_TYPE_TIME_PROFILE:
ncounters = 1; ncounters = 1;
...@@ -2080,10 +2057,6 @@ gimple_find_values_to_profile (histogram_values *values) ...@@ -2080,10 +2057,6 @@ gimple_find_values_to_profile (histogram_values *values)
hist->n_counters = 3; hist->n_counters = 3;
break; break;
case HIST_TYPE_CONST_DELTA:
hist->n_counters = 4;
break;
case HIST_TYPE_INDIR_CALL: case HIST_TYPE_INDIR_CALL:
hist->n_counters = 3; hist->n_counters = 3;
break; break;
......
...@@ -28,8 +28,6 @@ enum hist_type ...@@ -28,8 +28,6 @@ enum hist_type
HIST_TYPE_POW2, /* Histogram of power of 2 values. */ HIST_TYPE_POW2, /* Histogram of power of 2 values. */
HIST_TYPE_SINGLE_VALUE, /* Tries to identify the value that is (almost) HIST_TYPE_SINGLE_VALUE, /* Tries to identify the value that is (almost)
always constant. */ 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) HIST_TYPE_INDIR_CALL, /* Tries to identify the function that is (almost)
called in indirect call */ called in indirect call */
HIST_TYPE_AVERAGE, /* Compute average value (sum of all values). */ HIST_TYPE_AVERAGE, /* Compute average value (sum of all values). */
...@@ -107,8 +105,6 @@ extern void gimple_gen_ic_profiler (histogram_value, unsigned, unsigned); ...@@ -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_ic_func_profiler (void);
extern void gimple_gen_time_profiler (unsigned, unsigned, extern void gimple_gen_time_profiler (unsigned, unsigned,
gimple_stmt_iterator &); 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_average_profiler (histogram_value, unsigned, unsigned);
extern void gimple_gen_ior_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); extern void stream_out_histogram_value (struct output_block *, histogram_value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment