diff options
author | Martin Liska <mliska@suse.cz> | 2019-06-07 08:41:58 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-06-07 06:41:58 +0000 |
commit | e37333bad7b7df7fd9d2e5165f61c2a68b57a30d (patch) | |
tree | 11122c7c389797b0e1f14c47c37b5607faff8a47 /gcc | |
parent | cc261f66c268107b120add99942d729b3a489452 (diff) | |
download | gcc-e37333bad7b7df7fd9d2e5165f61c2a68b57a30d.zip gcc-e37333bad7b7df7fd9d2e5165f61c2a68b57a30d.tar.gz gcc-e37333bad7b7df7fd9d2e5165f61c2a68b57a30d.tar.bz2 |
Remove indirect call top N counter type.
2019-06-07 Martin Liska <mliska@suse.cz>
* doc/invoke.texi: Remove param.
* gcov-counter.def (GCOV_COUNTER_ICALL_TOPNV):
Remove.
* gcov-io.h (GCOV_ICALL_TOPN_VAL): Likewise.
(GCOV_ICALL_TOPN_NCOUNTS): Likewise.
* params.def (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
* profile.c (instrument_values): Remove
HIST_TYPE_INDIR_CALL_TOPN.
* tree-profile.c (init_ic_make_global_vars):
Always build __gcov_indirect_call only.
(gimple_init_gcov_profiler): Remove usage
of PARAM_INDIR_CALL_TOPN_PROFILE.
(gimple_gen_ic_profiler): Likewise.
* value-prof.c (dump_histogram_value): Likewise.
(stream_in_histogram_value): Likewise.
(gimple_indirect_call_to_profile): Likewise.
(gimple_find_values_to_profile): Likewise.
* value-prof.h (enum hist_type): Likewise.
2019-06-07 Martin Liska <mliska@suse.cz>
* Makefile.in: Remove usage of
_gcov_merge_icall_topn.
* libgcov-driver.c (gcov_sort_n_vals): Remove.
(gcov_sort_icall_topn_counter): Likewise.
(gcov_sort_topn_counter_arrays): Likewise.
(dump_one_gcov): Remove call to gcov_sort_topn_counter_arrays.
* libgcov-merge.c (__gcov_merge_icall_topn): Remove.
* libgcov-profiler.c (__gcov_topn_value_profiler_body):
Likewise.
(GCOV_ICALL_COUNTER_CLEAR_THRESHOLD): Remove.
(struct indirect_call_tuple): Remove.
(__gcov_indirect_call_topn_profiler): Remove.
* libgcov-util.c (__gcov_icall_topn_counter_op): Remove.
* libgcov.h (gcov_sort_n_vals): Remove.
(L_gcov_merge_icall_topn): Likewise.
(__gcov_merge_icall_topn): Likewise.
(__gcov_indirect_call_topn_profiler): Likewise.
From-SVN: r272030
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 21 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 3 | ||||
-rw-r--r-- | gcc/gcov-counter.def | 3 | ||||
-rw-r--r-- | gcc/gcov-io.h | 6 | ||||
-rw-r--r-- | gcc/params.def | 8 | ||||
-rw-r--r-- | gcc/profile.c | 1 | ||||
-rw-r--r-- | gcc/tree-profile.c | 14 | ||||
-rw-r--r-- | gcc/value-prof.c | 32 | ||||
-rw-r--r-- | gcc/value-prof.h | 2 |
9 files changed, 24 insertions, 66 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c37e315..cbbdbc2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,26 @@ 2019-06-07 Martin Liska <mliska@suse.cz> + * doc/invoke.texi: Remove param. + * gcov-counter.def (GCOV_COUNTER_ICALL_TOPNV): + Remove. + * gcov-io.h (GCOV_ICALL_TOPN_VAL): Likewise. + (GCOV_ICALL_TOPN_NCOUNTS): Likewise. + * params.def (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise. + * profile.c (instrument_values): Remove + HIST_TYPE_INDIR_CALL_TOPN. + * tree-profile.c (init_ic_make_global_vars): + Always build __gcov_indirect_call only. + (gimple_init_gcov_profiler): Remove usage + of PARAM_INDIR_CALL_TOPN_PROFILE. + (gimple_gen_ic_profiler): Likewise. + * value-prof.c (dump_histogram_value): Likewise. + (stream_in_histogram_value): Likewise. + (gimple_indirect_call_to_profile): Likewise. + (gimple_find_values_to_profile): Likewise. + * value-prof.h (enum hist_type): Likewise. + +2019-06-07 Martin Liska <mliska@suse.cz> + * tree-ssa-loop.c (get_lsm_tmp_name): Return at the end of the function. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 91c9bb8..50e50e3 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -12140,9 +12140,6 @@ will not try to thread through its block. Maximum number of nested calls to search for control dependencies during uninitialized variable analysis. -@item indir-call-topn-profile -Track top N target addresses in indirect-call profile. - @item max-once-peeled-insns The maximum number of insns of a peeled loop that rolls only once. diff --git a/gcc/gcov-counter.def b/gcc/gcov-counter.def index 3a0e620..b0596c8 100644 --- a/gcc/gcov-counter.def +++ b/gcc/gcov-counter.def @@ -49,6 +49,3 @@ DEF_GCOV_COUNTER(GCOV_COUNTER_IOR, "ior", _ior) /* Time profile collecting first run of a function */ DEF_GCOV_COUNTER(GCOV_TIME_PROFILER, "time_profiler", _time_profile) - -/* Top N value tracking for indirect calls. */ -DEF_GCOV_COUNTER(GCOV_COUNTER_ICALL_TOPNV, "indirect_call_topn", _icall_topn) diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 9edb292..69c9a73 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -266,12 +266,6 @@ GCOV_COUNTERS #define GCOV_N_VALUE_COUNTERS \ (GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1) -/* The number of hottest callees to be tracked. */ -#define GCOV_ICALL_TOPN_VAL 2 - -/* The number of counter entries per icall callsite. */ -#define GCOV_ICALL_TOPN_NCOUNTS (1 + GCOV_ICALL_TOPN_VAL * 4) - /* Convert a counter index to a tag. */ #define GCOV_TAG_FOR_COUNTER(COUNT) \ (GCOV_TAG_COUNTER_BASE + ((gcov_unsigned_t)(COUNT) << 17)) diff --git a/gcc/params.def b/gcc/params.def index 6b7f7eb..b4a4e4a 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -992,14 +992,6 @@ DEFPARAM (PARAM_PROFILE_FUNC_INTERNAL_ID, "Use internal function id in profile lookup.", 0, 0, 1) -/* When the parameter is 1, track the most frequent N target - addresses in indirect-call profile. This disables - indirect_call_profiler_v3 which tracks single target. */ -DEFPARAM (PARAM_INDIR_CALL_TOPN_PROFILE, - "indir-call-topn-profile", - "Track top N target addresses in indirect-call profile.", - 0, 0, 1) - /* Avoid SLP vectorization of large basic blocks. */ DEFPARAM (PARAM_SLP_MAX_INSNS_IN_BB, "slp-max-insns-in-bb", diff --git a/gcc/profile.c b/gcc/profile.c index a1dba1a..9aff9ef 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -172,7 +172,6 @@ instrument_values (histogram_values values) break; case HIST_TYPE_INDIR_CALL: - case HIST_TYPE_INDIR_CALL_TOPN: gimple_gen_ic_profiler (hist, t, 0); break; diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 9b6f351..f2cf404 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -101,11 +101,7 @@ init_ic_make_global_vars (void) ic_tuple_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, - get_identifier ( - (PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE) ? - "__gcov_indirect_call_topn" : - "__gcov_indirect_call")), - tuple_type); + get_identifier ("__gcov_indirect_call"), tuple_type); TREE_PUBLIC (ic_tuple_var) = 1; DECL_ARTIFICIAL (ic_tuple_var) = 1; DECL_INITIAL (ic_tuple_var) = NULL; @@ -187,8 +183,6 @@ gimple_init_gcov_profiler (void) ptr_type_node, NULL_TREE); profiler_fn_name = "__gcov_indirect_call_profiler_v3"; - if (PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE)) - profiler_fn_name = "__gcov_indirect_call_topn_profiler"; tree_indirect_call_profiler_fn = build_fn_decl (profiler_fn_name, ic_profiler_fn_type); @@ -376,12 +370,6 @@ gimple_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base) gimple_stmt_iterator gsi = gsi_for_stmt (stmt); tree ref_ptr = tree_coverage_counter_addr (tag, base); - if ( (PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE) && - tag == GCOV_COUNTER_V_INDIR) || - (!PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE) && - tag == GCOV_COUNTER_ICALL_TOPNV)) - return; - ref_ptr = force_gimple_operand_gsi (&gsi, ref_ptr, true, NULL_TREE, true, GSI_SAME_STMT); diff --git a/gcc/value-prof.c b/gcc/value-prof.c index d34d2ab..1e14e53 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -316,22 +316,6 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) } fprintf (dump_file, ".\n"); break; - case HIST_TYPE_INDIR_CALL_TOPN: - fprintf (dump_file, "Indirect call topn "); - if (hist->hvalue.counters) - { - int i; - - fprintf (dump_file, "accu:%" PRId64, hist->hvalue.counters[0]); - for (i = 1; i < (GCOV_ICALL_TOPN_VAL << 2); i += 2) - { - fprintf (dump_file, " target:%" PRId64 " value:%" PRId64, - (int64_t) hist->hvalue.counters[i], - (int64_t) hist->hvalue.counters[i+1]); - } - } - fprintf (dump_file, ".\n"); - break; case HIST_TYPE_MAX: gcc_unreachable (); } @@ -416,10 +400,6 @@ stream_in_histogram_value (struct lto_input_block *ib, gimple *stmt) ncounters = 1; break; - case HIST_TYPE_INDIR_CALL_TOPN: - ncounters = (GCOV_ICALL_TOPN_VAL << 2) + 1; - break; - case HIST_TYPE_MAX: gcc_unreachable (); } @@ -1865,12 +1845,8 @@ gimple_indirect_call_to_profile (gimple *stmt, histogram_values *values) values->reserve (3); - values->quick_push (gimple_alloc_histogram_value ( - cfun, - PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE) ? - HIST_TYPE_INDIR_CALL_TOPN : - HIST_TYPE_INDIR_CALL, - stmt, callee)); + values->quick_push (gimple_alloc_histogram_value (cfun, HIST_TYPE_INDIR_CALL, + stmt, callee)); return; } @@ -1971,10 +1947,6 @@ gimple_find_values_to_profile (histogram_values *values) hist->n_counters = 1; break; - case HIST_TYPE_INDIR_CALL_TOPN: - hist->n_counters = GCOV_ICALL_TOPN_NCOUNTS; - break; - default: gcc_unreachable (); } diff --git a/gcc/value-prof.h b/gcc/value-prof.h index 1251fa9..a54024b 100644 --- a/gcc/value-prof.h +++ b/gcc/value-prof.h @@ -33,8 +33,6 @@ enum hist_type HIST_TYPE_AVERAGE, /* Compute average value (sum of all values). */ HIST_TYPE_IOR, /* Used to compute expected alignment. */ HIST_TYPE_TIME_PROFILE, /* Used for time profile */ - HIST_TYPE_INDIR_CALL_TOPN, /* Tries to identify the top N most frequently - called functions in indirect call. */ HIST_TYPE_MAX }; |