diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-08-02 10:09:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-08-02 10:09:04 +0000 |
commit | cc692b4c402bba7dd92f681e3e095b5c6e5f27dd (patch) | |
tree | 9d16a6847a5a9ac6689cab729eeb4647fcf40954 /gcc/predict.c | |
parent | d603877768c5a4ed26481afc0aff99e87a0a8d62 (diff) | |
download | gcc-cc692b4c402bba7dd92f681e3e095b5c6e5f27dd.zip gcc-cc692b4c402bba7dd92f681e3e095b5c6e5f27dd.tar.gz gcc-cc692b4c402bba7dd92f681e3e095b5c6e5f27dd.tar.bz2 |
invoke.texi (hot-bb-count-fraction): Rework description.
* doc/invoke.texi (hot-bb-count-fraction): Rework description.
(hot-bb-count-ws-permille): Likewise.
(hot-bb-frequency-fraction): Likewise.
(unlikely-bb-count-fraction): Likewise.
* params.def (hot-bb-count-fraction): Rework description.
(hot-bb-count-ws-permille): Likewise.
(hot-bb-frequency-fraction): Likewise.
(unlikely-bb-count-fraction): Likewise. Remove min and max values.
* predict.c (get_hot_bb_threshold): Deal with 0 HOT_BB_COUNT_FRACTION.
From-SVN: r274006
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index f7bcbff..915f080 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -132,11 +132,15 @@ get_hot_bb_threshold () { if (min_count == -1) { - gcov_type t = profile_info->sum_max / PARAM_VALUE (HOT_BB_COUNT_FRACTION); - set_hot_bb_threshold (t); + const int hot_frac = PARAM_VALUE (HOT_BB_COUNT_FRACTION); + const gcov_type min_hot_count + = hot_frac + ? profile_info->sum_max / hot_frac + : (gcov_type)profile_count::max_count; + set_hot_bb_threshold (min_hot_count); if (dump_file) fprintf (dump_file, "Setting hotness threshold to %" PRId64 ".\n", - min_count); + min_hot_count); } return min_count; } |