Lines Matching refs:loop

16 RTL, as well as the interfaces to loop-related analyses (induction
25 * loop-iv:: Induction variables on RTL.
28 * Lambda:: Linear loop transformations framework.
39 At the moment, loop structures are analyzed and this information is
44 In general, a natural loop has one entry block (header) and possibly
46 the loop. Loops with several latches may appear if several loops share
47 a single header, or if there is a branching in the middle of the loop.
49 single latch. During loop analysis, headers of such loops are split and
52 the latches correspond to sub-loops or to control flow in a single loop.
57 Body of the loop is the set of blocks that are dominated by its header,
60 loops immediately contained inside loop L are the children of L in the
62 The root of this tree is a fake loop that contains all blocks in the
63 function. Each of the loops is represented in a @code{struct loop}
64 structure. Each loop is assigned an index (@code{num} field of the
65 @code{struct loop} structure), and the pointer to the loop is stored in
67 structure. Index of a sub-loop is always greater than the index of its
68 super-loop. The indices do not have to be continuous, there may be
70 loops. The index of a loop never changes. The first unused index is
73 Each basic block contains the reference to the innermost loop it belongs
77 to contain the @code{struct loops} structure, especially if the loop
78 structures are updated throughout several passes. Many of the loop
83 bitmask. These flags specify what other properties of the loop
88 a way that each loop has only one entry edge, and additionally, the
90 natural place where the code can be moved out of the loop, and ensures
91 that the entry edge of the loop leads from its immediate super-loop.
93 force the latch block of each loop to have only one successor. This
94 ensures that the latch of the loop does not belong to any of its
96 Most of the loop manipulation functions assume that the loops are in
97 this shape. Note that with this flag, the ``normal'' loop without any
105 edges of such a loop, if they lead to/from this region).
106 @item @code{LOOPS_HAVE_MARKED_SINGLE_EXITS}: If a loop has exactly one
107 exit edge, this edge is stored in @code{single_exit} field of the loop
118 The CFG manipulation functions in general do not update loop structures.
131 the innermost loop to that the block belongs. The most useful fields of
132 loop structure (that are kept up-to-date at all times) are:
136 loop.
137 @item @code{num_nodes}: Number of basic blocks in the loop (including
139 @item @code{depth}: The depth of the loop in the loops tree, i.e., the
140 number of super-loops of the loop.
141 @item @code{outer}, @code{inner}, @code{next}: The super-loop, the first
142 sub-loop, and the sibling of the loop in the loops tree.
143 @item @code{single_exit}: The exit edge of the loop, if the loop has
148 There are other fields in the loop structures, many of them used only by
152 The most important functions to query loop structures are:
157 @item @code{verify_loop_structure}: Checks consistency of the loop
159 @item @code{loop_latch_edge}: Returns the latch edge of a loop.
161 the preheader edge of a loop.
162 @item @code{flow_loop_nested_p}: Tests whether loop is a sub-loop of
163 another loop.
165 to a loop (including its sub-loops).
166 @item @code{find_common_loop}: Finds the common super-loop of two loops.
167 @item @code{superloop_at_depth}: Returns the super-loop of a loop with
170 number of insns in the loop, on GIMPLE and on RTL.
172 loop.
177 loop in depth-first search order in reversed CFG, ordered by dominance
179 @item @code{get_loop_exit_edges}: Enumerates the exit edges of a loop.
181 is executed exactly once during each iteration of a loop (that is, it
182 does not belong to a sub-loop, and it dominates the latch of the loop).
194 @item @code{add_bb_to_loop}: Adds a basic block to a loop.
199 update loop structures are provided:
211 @item @code{split_loop_exit_edge}: Splits exit edge of the loop,
212 ensuring that PHI node arguments remain in the loop (this ensures that
213 loop-closed SSA form is preserved). Only useful on GIMPLE.
216 Finally, there are some higher-level loop transformations implemented.
227 on GIMPLE) duplicate the body of the loop prescribed number of times on
228 one of the edges entering loop header, thus performing either loop
229 unrolling or loop peeling. @code{can_duplicate_loop_p}
231 loop.
233 create a copy of a loop, and a branch before them that selects one of
236 the copies of the loop is usually left unchanged, while the other one is
238 @item @code{tree_unroll_loop}: Unrolls the loop, including peeling the
249 Throughout the loop optimizations on tree level, one extra condition is
250 enforced on the SSA form: No SSA name is used outside of the loop in
252 ``loop-closed SSA form'' -- LCSSA. To enforce LCSSA, PHI nodes must be
261 replacement) are interested in the values that are defined in the loop
265 loop in that the analysis should be performed -- the scalar evolution
266 analysis always returns the results with respect to the loop in that the
268 @item It makes updating of SSA form during loop transformations simpler.
269 Without LCSSA, operations like loop unrolling may force creation of PHI
270 nodes arbitrarily far from the loop, while in LCSSA, the SSA form can be
278 straightforward, unless you create a new value in loop and use it
279 outside, or unless you manipulate loop exit edges (functions are
299 most of the loop transformations, including removal of code. If such a
306 other SSA names defined in the loop. To resolve these (potentially
312 including the super-loops of the current loop, thus providing a complete
313 information about the behavior of the variable in the loop nest.
314 @code{resolve_mixers} is useful if you work with only one loop at a
317 current loop, leaving the SSA names defined outside unchanged, even if
324 has three arguments -- base, step and loop (both base and step may
327 @code{POLYNOMIAL_CHREC(base, step, loop)} if it is (in the specified
328 loop) equivalent to @code{x_1} in the following example
342 overflow (which restricts the number of iterations of such a loop).
348 is a loop-invariant base and step.
350 @node loop-iv
355 affine induction variables, and only in one loop at once. The interface
357 in a loop L, @code{iv_analysis_loop_init} function must be called on L.
403 the number of iterations of a loop, with a similar interface. In many
415 this condition is true, the loop exits in the first iteration.
416 @item @code{infinite}: If this condition is true, the loop is infinite.
418 finiteness of the loop are included in @code{assumptions}.
421 the number of executions of the loop latch.
425 analysis framework to be initialized (SCEV on GIMPLE, loop-iv on RTL).
427 structure. Number of iterations before the loop is exited through a
432 all the exits of a loop and try to find one with easy to determine
446 the exit statement, not of the loop latch).
456 loop is @code{compute_data_dependences_for_loop}. This function is
457 currently used by the linear loop transform and the vectorization
460 contained in the analyzed loop body, and the second vector will contain
464 analyzed loop contains side effects, such as calls that potentially can
465 interfere with the data references in the current analyzed loop, the
466 analysis stops while scanning the loop body for data references, and
471 scanning of the loop body: the loop body is analyzed in execution order,
477 queries to the loop body representation.
488 represent the evolution of the data reference in the loop relative to
496 location accessed by the data reference in the loop and about the access
500 access that starts from the first location accessed in the loop. For
575 @section Linear loop transformations framework
576 @cindex Linear loop transformations framework
580 loop bounds. This allows compositions of skewing, scaling, interchange,
582 improve cache behavior or remove inner loop dependencies to allow
588 @code{gcc_loopnest_to_lambda_loopnest} is provided. If the loop cannot
595 loop (dependence respecting, etc). Lambda simply applies whatever