[gcc(refs/users/ppalka/heads/integer_class_type)] Extern -param=max-predicted-iterations range.
Patrick Palka
ppalka@gcc.gnu.org
Fri Jan 17 03:58:00 GMT 2020
https://gcc.gnu.org/g:b6a0ebd1920300db383cd9e213c3bc2afb76e52d
commit b6a0ebd1920300db383cd9e213c3bc2afb76e52d
Author: Jan Hubicka <jh@suse.cz>
Date: Fri Jan 17 00:50:22 2020 +0100
Extern -param=max-predicted-iterations range.
* params.opt (-param=max-predicted-iterations): Increase range from 0.
* predict.c (estimate_loops): Add 1 to param_max_predicted_iterations.
Diff:
---
gcc/ChangeLog | 5 +++++
gcc/params.opt | 2 +-
gcc/predict.c | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 907d0f7..febcd6f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2020-01-16 Jan Hubicka <hubicka@ucw.cz>
+ * params.opt (-param=max-predicted-iterations): Increase range from 0.
+ * predict.c (estimate_loops): Add 1 to param_max_predicted_iterations.
+
+2020-01-16 Jan Hubicka <hubicka@ucw.cz>
+
* ipa-fnsummary.c (estimate_calls_size_and_time): Fix formating of
dump.
* params.opt: (max-predicted-iterations): Set bounds.
diff --git a/gcc/params.opt b/gcc/params.opt
index f02c769..8e4217d 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -555,7 +555,7 @@ Common Joined UInteger Var(param_max_pow_sqrt_depth) Init(5) IntegerRange(1, 32)
Maximum depth of sqrt chains to use when synthesizing exponentiation by a real constant.
-param=max-predicted-iterations=
-Common Joined UInteger Var(param_max_predicted_iterations) Init(100) IntegerRange(1, 65536) Param Optimization
+Common Joined UInteger Var(param_max_predicted_iterations) Init(100) IntegerRange(0, 65536) Param Optimization
The maximum number of loop iterations we predict statically.
-param=max-reload-search-insns=
diff --git a/gcc/predict.c b/gcc/predict.c
index c3aed9e..1b00058 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -3427,7 +3427,8 @@ estimate_loops (void)
{
auto_bitmap tovisit;
basic_block bb;
- sreal max_cyclic_prob = (sreal)1 - (sreal)1 / param_max_predicted_iterations;
+ sreal max_cyclic_prob = (sreal)1
+ - (sreal)1 / (param_max_predicted_iterations + 1);
/* Start by estimating the frequencies in the loops. */
if (number_of_loops (cfun) > 1)
More information about the Gcc-cvs
mailing list