summaryrefslogtreecommitdiff
path: root/gcc/doc/loop.texi
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-01-31 14:50:06 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-01-31 13:50:06 +0000
commit677cc14d2d379a47a489cbbe14380983efe36884 (patch)
tree946e9668080a203091ce6a81aea398fc4b6ce57c /gcc/doc/loop.texi
parente7917d06e81b8ec0b763bd479861cb60e029bbb9 (diff)
cfgloop.h: Include vec-prim.h.
* cfgloop.h: Include vec-prim.h. (enum li_flags): Remove LI_ONLY_OLD. (loop_iterator): Changed. (fel_next, fel_init): Iterate over loop tree. (FOR_EACH_LOOP_BREAK): New macro. * loop-unswitch.c (unswitch_loops): Do not pass LI_ONLY_OLD to FOR_EACH_LOOP. * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-vectorizer.c (vectorize_loops): Ditto. * doc/loop.texi: Update information on loop numbering and behavior of FOR_EACH_LOOP wrto new loops. * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop, add_to_evolution_1): Test nestedness of loops instead of comparing their numbers. * tree-chrec.c (chrec_fold_plus_poly_poly, chrec_fold_multiply_poly_poly, chrec_evaluate, hide_evolution_in_other_loops_than_loop, chrec_component_in_loop_num, reset_evolution_in_loop): Ditto. * Makefile.in (CFGLOOP_H): Add vecprim.h dependency. From-SVN: r121422
Diffstat (limited to 'gcc/doc/loop.texi')
-rw-r--r--gcc/doc/loop.texi15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/doc/loop.texi b/gcc/doc/loop.texi
index fade89d32e8..e486b0c5d10 100644
--- a/gcc/doc/loop.texi
+++ b/gcc/doc/loop.texi
@@ -64,17 +64,24 @@ function. Each of the loops is represented in a @code{struct loop}
structure. Each loop is assigned an index (@code{num} field of the
@code{struct loop} structure), and the pointer to the loop is stored in
the corresponding field of the @code{larray} vector in the loops
-structure. Index of a sub-loop is always greater than the index of its
-super-loop. The indices do not have to be continuous, there may be
+structure. The indices do not have to be continuous, there may be
empty (@code{NULL}) entries in the @code{larray} created by deleting
-loops. The index of a loop never changes.
+loops. Also, there is no guarantee on the relative order of a loop
+and its subloops in the numbering. The index of a loop never changes.
The entries of the @code{larray} field should not be accessed directly.
The function @code{get_loop} returns the loop description for a loop with
the given index. @code{number_of_loops} function returns number of
loops in the function. To traverse all loops, use @code{FOR_EACH_LOOP}
macro. The @code{flags} argument of the macro is used to determine
-the direction of traversal and the set of loops visited.
+the direction of traversal and the set of loops visited. Each loop is
+guaranteed to be visited exactly once, regardless of the changes to the
+loop tree, and the loops may be removed during the traversal. The newly
+created loops are never traversed, if they need to be visited, this
+must be done separately after their creation. The @code{FOR_EACH_LOOP}
+macro allocates temporary variables. If the @code{FOR_EACH_LOOP} loop
+were ended using break or goto, they would not be released;
+@code{FOR_EACH_LOOP_BREAK} macro must be used instead.
Each basic block contains the reference to the innermost loop it belongs
to (@code{loop_father}). For this reason, it is only possible to have