diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 13:50:06 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 13:50:06 +0000 |
commit | 3bbbcdff3d9d98e86abbd8ce8090b8fbb518bfba (patch) | |
tree | 946e9668080a203091ce6a81aea398fc4b6ce57c /gcc/doc/loop.texi | |
parent | 6ce0c450c4fefd85f09026e0f9df6cbb901f5f9b (diff) | |
download | gcc-3bbbcdff3d9d98e86abbd8ce8090b8fbb518bfba.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/loop.texi')
-rw-r--r-- | gcc/doc/loop.texi | 15 |
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 |