+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
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);
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. */
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
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)
ncounters = 3;
break;
- case HIST_TYPE_CONST_DELTA:
- ncounters = 4;
- break;
-
case HIST_TYPE_IOR:
case HIST_TYPE_TIME_PROFILE:
ncounters = 1;
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;
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). */
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);