diff options
Diffstat (limited to 'gcc/cfgloopanal.c')
-rw-r--r-- | gcc/cfgloopanal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c index c1639869278..2739f44a3a6 100644 --- a/gcc/cfgloopanal.c +++ b/gcc/cfgloopanal.c @@ -241,10 +241,9 @@ expected_loop_iterations_unbounded (const struct loop *loop, if (read_profile_p) *read_profile_p = false; - /* Average loop rolls about 3 times. If we have no profile at all, it is - best we can do. */ + /* If we have no profile at all, use AVG_LOOP_NITER. */ if (profile_status_for_fn (cfun) == PROFILE_ABSENT) - expected = 3; + expected = PARAM_VALUE (PARAM_AVG_LOOP_NITER); else if (loop->latch->count || loop->header->count) { gcov_type count_in, count_latch; @@ -282,9 +281,9 @@ expected_loop_iterations_unbounded (const struct loop *loop, if (freq_in == 0) { - /* If we have no profile at all, expect 3 iterations. */ + /* If we have no profile at all, use AVG_LOOP_NITER iterations. */ if (!freq_latch) - expected = 3; + expected = PARAM_VALUE (PARAM_AVG_LOOP_NITER); else expected = freq_latch * 2; } |