diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/profile.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3a7bc2..f672e93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-01-22 Martin Liska <mliska@suse.cz> + + PR tree-optimization/92924 + * profile.c (compute_value_histograms): Divide + all counter values. + 2020-01-22 Jakub Jelinek <jakub@redhat.com> PR target/91298 diff --git a/gcc/profile.c b/gcc/profile.c index 6a2de21..cd754c4 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -863,7 +863,15 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum, if (hist->type == HIST_TYPE_TOPN_VALUES || hist->type == HIST_TYPE_INDIR_CALL) - sort_hist_values (hist); + { + /* Each count value is multiplied by GCOV_TOPN_VALUES. */ + if (hist->hvalue.counters[2] != -1) + for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++) + hist->hvalue.counters[2 * i + 2] + = RDIV (hist->hvalue.counters[2 * i + 2], GCOV_TOPN_VALUES); + + sort_hist_values (hist); + } /* Time profiler counter is not related to any statement, so that we have to read the counter and set the value to |