diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2006-12-11 00:34:20 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2006-12-10 23:34:20 +0000 |
commit | a14865dbe011d40552b95f646dd4172a81188601 (patch) | |
tree | 49e4518b80f9f2c4c2ddf2edcbb93a2d6e48c84d /gcc/tree-ssa-loop-ivcanon.c | |
parent | c7463db95a98bc9b4372e2ab77df993f5dddd337 (diff) | |
download | gcc-a14865dbe011d40552b95f646dd4172a81188601.tar.gz |
loop.texi: Document number_of_latch_executions and number_of_cond_exit_executions.
* doc/loop.texi: Document number_of_latch_executions and
number_of_cond_exit_executions.
* tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
chrec_is_positive, number_of_iterations_for_all_loops,
scev_const_prop): Use number_of_latch_executions.
(set_nb_iterations_in_loop): Do not increase the value of the
number of iterations.
(number_of_iterations_in_loop): Renamed to ...
(number_of_latch_executions): ... this.
(number_of_exit_cond_executions): New function.
* tree-scalar-evolution.h (number_of_iterations_in_loop): Declaration
removed.
(number_of_latch_executions, number_of_exit_cond_executions): Declare.
* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Use
number_of_latch_executions.
* tree-data-ref.c (get_number_of_iters_for_loop): Use
number_of_exit_cond_executions.
* tree-vect-analyze.c (vect_get_loop_niters): Ditto.
* cfgloop.h (struct loop): Improve description of the nb_iterations
field.
* gcc.dg/tree-ssa/loop-17.c: Update outcome.
From-SVN: r119718
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 63268017670..c26727a808d 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -279,18 +279,12 @@ canonicalize_loop_induction_variables (struct loop *loop, edge exit = NULL; tree niter; - niter = number_of_iterations_in_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; - - /* The result of number_of_iterations_in_loop is by one higher than - we expect (i.e. it returns number of executions of the exit - condition, not of the loop latch edge). */ - niter = fold_build2 (MINUS_EXPR, TREE_TYPE (niter), niter, - build_int_cst (TREE_TYPE (niter), 1)); } else { |