aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-03-30 16:30:57 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2016-03-30 14:30:57 +0000
commitba9c755f257ad36eaa7335c48008c76c27c0b30c (patch)
tree2c2462790bd07263fc7a94de1236e8fb1f73b78d /gcc/tree-ssa-loop-niter.c
parentf6d2d066c26ebf0def0bd6d4be32c1d4801039fa (diff)
downloadgcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.zip
gcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.tar.gz
gcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.tar.bz2
tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here.
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int. (tree_unswitch_outer_loop): Likewise. * tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise. * tree-vect-loop.c (vect_analyze_loop_2): Likewise. From-SVN: r234572
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 81689fc..c93e563 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3115,7 +3115,6 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta)
tree low, high, type, next;
bool sign, upper = true, at_end = false;
struct loop *loop = data->loop;
- bool reliable = true;
if (TREE_CODE (base) != ARRAY_REF)
return true;
@@ -3187,14 +3186,14 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta)
&& tree_int_cst_compare (next, high) <= 0)
return true;
- /* If access is not executed on every iteration, we must ensure that overlow may
- not make the access valid later. */
+ /* If access is not executed on every iteration, we must ensure that overlow
+ may not make the access valid later. */
if (!dominated_by_p (CDI_DOMINATORS, loop->latch, gimple_bb (data->stmt))
&& scev_probably_wraps_p (initial_condition_in_loop_num (ev, loop->num),
step, data->stmt, loop, true))
- reliable = false;
+ upper = false;
- record_nonwrapping_iv (loop, init, step, data->stmt, low, high, reliable, upper);
+ record_nonwrapping_iv (loop, init, step, data->stmt, low, high, false, upper);
return true;
}