diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-05 11:14:16 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-05 11:14:16 +0000 |
commit | 57337fec9b4a70c3f34aaaa65ae238206aa0e3db (patch) | |
tree | f146274ac306166de82576e3d78df124ff7791e3 /gcc/tree-ssa-loop-ivcanon.c | |
parent | dd0b2a67efee1547f60c9b20d4c9cf4efa6355cf (diff) | |
download | gcc-57337fec9b4a70c3f34aaaa65ae238206aa0e3db.tar.gz |
* tree-ssa-loop-niter.c (find_loop_niter): Remove just_once_each_iteration_p.
(maybe_lower_iteration_bound): Initialize not_executed_last_iteration to NULL
* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Skip
just_once_each_iteration_p; record estimated bound when loop has only one
likely exit; test just_once_each_iteration_p before IV canon itself.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 433bb7783cf..58f45d2d1c4 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -760,11 +760,7 @@ canonicalize_loop_induction_variables (struct loop *loop, niter = number_of_latch_executions (loop); if (TREE_CODE (niter) == INTEGER_CST) - { - exit = single_exit (loop); - if (!just_once_each_iteration_p (loop, exit->src)) - return false; - } + exit = single_exit (loop); else { /* If the loop has more than one exit, try checking all of them @@ -785,7 +781,10 @@ canonicalize_loop_induction_variables (struct loop *loop, /* We work exceptionally hard here to estimate the bound by find_loop_niter_by_eval. Be sure to keep it for future. */ if (niter && TREE_CODE (niter) == INTEGER_CST) - record_niter_bound (loop, tree_to_double_int (niter), false, true); + { + record_niter_bound (loop, tree_to_double_int (niter), + exit == single_likely_exit (loop), true); + } /* Force re-computation of loop bounds so we can remove redundant exits. */ maxiter = max_loop_iterations_int (loop); @@ -813,7 +812,8 @@ canonicalize_loop_induction_variables (struct loop *loop, return true; if (create_iv - && niter && !chrec_contains_undetermined (niter)) + && niter && !chrec_contains_undetermined (niter) + && exit && just_once_each_iteration_p (loop, exit->src)) create_canonical_iv (loop, exit, niter); return modified; |