Commit cc692b4c by Eric Botcazou Committed by Eric Botcazou

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
parent d6038777
2019-08-02 Eric Botcazou <ebotcazou@adacore.com>
* 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.
2019-08-02 Uroš Bizjak <ubizjak@gmail.com> 2019-08-02 Uroš Bizjak <ubizjak@gmail.com>
PR target/91323 PR target/91323
......
...@@ -11443,13 +11443,38 @@ for vectorizer. Value -1 means no limit. ...@@ -11443,13 +11443,38 @@ for vectorizer. Value -1 means no limit.
The maximum number of iterations of a loop the brute-force algorithm The maximum number of iterations of a loop the brute-force algorithm
for analysis of the number of iterations of the loop tries to evaluate. for analysis of the number of iterations of the loop tries to evaluate.
@item hot-bb-count-fraction
The denominator n of fraction 1/n of the maximal execution count of a
basic block in the entire program that a basic block needs to at least
have in order to be considered hot. The default is 10000, which means
that a basic block is considered hot if its execution count is greater
than 1/10000 of the maximal execution count. 0 means that it is never
considered hot. Used in non-LTO mode.
@item hot-bb-count-ws-permille @item hot-bb-count-ws-permille
A basic block profile count is considered hot if it contributes to The number of most executed permilles, ranging from 0 to 1000, of the
the given permillage (i.e.@: 0...1000) of the entire profiled execution. profiled execution of the entire program to which the execution count
of a basic block must be part of in order to be considered hot. The
default is 990, which means that a basic block is considered hot if
its execution count contributes to the upper 990 permilles, or 99.0%,
of the profiled execution of the entire program. 0 means that it is
never considered hot. Used in LTO mode.
@item hot-bb-frequency-fraction @item hot-bb-frequency-fraction
Select fraction of the entry block frequency of executions of basic block in The denominator n of fraction 1/n of the execution frequency of the
function given basic block needs to have to be considered hot. entry block of a function that a basic block of this function needs
to at least have in order to be considered hot. The default is 1000,
which means that a basic block is considered hot in a function if it
is executed more frequently than 1/1000 of the frequency of the entry
block of the function. 0 means that it is never considered hot.
@item unlikely-bb-count-fraction
The denominator n of fraction 1/n of the number of profiled runs of
the entire program below which the execution count of a basic block
must be in order for the basic block to be considered unlikely executed.
The default is 20, which means that a basic block is considered unlikely
executed if it is executed in fewer than 1/20, or 5%, of the runs of
the program. 0 means that it is always considered unlikely executed.
@item max-predicted-iterations @item max-predicted-iterations
The maximum number of loop iterations we predict statically. This is useful The maximum number of loop iterations we predict statically. This is useful
...@@ -12130,11 +12155,6 @@ A threshold on the average loop count considered by the swing modulo scheduler. ...@@ -12130,11 +12155,6 @@ A threshold on the average loop count considered by the swing modulo scheduler.
The number of cycles the swing modulo scheduler considers when checking The number of cycles the swing modulo scheduler considers when checking
conflicts using DFA. conflicts using DFA.
@item hot-bb-count-fraction
Select fraction of the maximal count of repetitions of basic block
in program given basic block needs
to have to be considered hot (used in non-LTO mode)
@item max-inline-insns-recursive-auto @item max-inline-insns-recursive-auto
The maximum number of instructions non-inline function The maximum number of instructions non-inline function
can grow to via recursive inlining. can grow to via recursive inlining.
...@@ -12172,10 +12192,6 @@ Maximum number of arrays per scop. ...@@ -12172,10 +12192,6 @@ Maximum number of arrays per scop.
@item max-vartrack-reverse-op-size @item max-vartrack-reverse-op-size
Max. size of loc list for which reverse ops should be added. Max. size of loc list for which reverse ops should be added.
@item unlikely-bb-count-fraction
The minimum fraction of profile runs a given basic block execution count
must be not to be considered unlikely.
@item tracer-dynamic-coverage-feedback @item tracer-dynamic-coverage-feedback
The percentage of function, weighted by execution frequency, The percentage of function, weighted by execution frequency,
that must be covered by trace formation. that must be covered by trace formation.
...@@ -427,23 +427,31 @@ DEFPARAM(PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD, ...@@ -427,23 +427,31 @@ DEFPARAM(PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD,
DEFPARAM(HOT_BB_COUNT_FRACTION, DEFPARAM(HOT_BB_COUNT_FRACTION,
"hot-bb-count-fraction", "hot-bb-count-fraction",
"Select fraction of the maximal count of repetitions of basic block in program given basic " "The denominator n of fraction 1/n of the maximal execution count of "
"block needs to have to be considered hot (used in non-LTO mode).", "a basic block in the entire program that a basic block needs to at "
"least have in order to be considered hot (used in non-LTO mode).",
10000, 0, 0) 10000, 0, 0)
DEFPARAM(HOT_BB_COUNT_WS_PERMILLE, DEFPARAM(HOT_BB_COUNT_WS_PERMILLE,
"hot-bb-count-ws-permille", "hot-bb-count-ws-permille",
"A basic block profile count is considered hot if it contributes to " "The number of most executed permilles of the profiled execution of "
"the given permillage of the entire profiled execution (used in LTO mode).", "the entire program to which the execution count of a basic block "
"must be part of in order to be considered hot (used in LTO mode).",
990, 0, 1000) 990, 0, 1000)
DEFPARAM(HOT_BB_FREQUENCY_FRACTION, DEFPARAM(HOT_BB_FREQUENCY_FRACTION,
"hot-bb-frequency-fraction", "hot-bb-frequency-fraction",
"Select fraction of the maximal frequency of executions of basic block in function given basic block needs to have to be considered hot.", "The denominator n of fraction 1/n of the execution frequency of the "
"entry block of a function that a basic block of this function needs "
"to at least have in order to be considered hot.",
1000, 0, 0) 1000, 0, 0)
DEFPARAM(UNLIKELY_BB_COUNT_FRACTION, DEFPARAM(UNLIKELY_BB_COUNT_FRACTION,
"unlikely-bb-count-fraction", "unlikely-bb-count-fraction",
"The minimum fraction of profile runs a given basic block execution count must be not to be considered unlikely.", "The denominator n of fraction 1/n of the number of profiled runs of "
20, 1, 10000) "the entire program below which the execution count of a basic block "
"must be in order for the basic block to be considered unlikely.",
20, 0, 0)
DEFPARAM (PARAM_ALIGN_THRESHOLD, DEFPARAM (PARAM_ALIGN_THRESHOLD,
"align-threshold", "align-threshold",
......
...@@ -132,11 +132,15 @@ get_hot_bb_threshold () ...@@ -132,11 +132,15 @@ get_hot_bb_threshold ()
{ {
if (min_count == -1) if (min_count == -1)
{ {
gcov_type t = profile_info->sum_max / PARAM_VALUE (HOT_BB_COUNT_FRACTION); const int hot_frac = PARAM_VALUE (HOT_BB_COUNT_FRACTION);
set_hot_bb_threshold (t); 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) if (dump_file)
fprintf (dump_file, "Setting hotness threshold to %" PRId64 ".\n", fprintf (dump_file, "Setting hotness threshold to %" PRId64 ".\n",
min_count); min_hot_count);
} }
return min_count; return min_count;
} }
......
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