Home | History | Annotate | Download | only in include

Lines Matching refs:LOOP

1 /* Natural loop functions
49 /* The structure describing a bound on number of iterations of a loop. */
64 /* True if the statement will cause the loop to be leaved the (at most)
73 /* Description of the loop exit. */
79 /* Previous and next exit in the list of the exits of the loop. */
87 typedef struct loop *loop_p;
102 /* Structure to hold information for each natural loop. */
103 struct GTY ((chain_next ("%h.next"))) loop {
107 /* Number of loop insns. */
110 /* Basic block of loop header. */
113 /* Basic block of loop latch. */
116 /* For loop unrolling/peeling decision. */
122 /* Number of blocks contained within the loop. */
125 /* Superloops of the loop, starting with the outermost loop. */
128 /* The first inner (child) loop or NULL if innermost loop. */
129 struct loop *inner;
131 /* Link to the next (sibling) loop. */
132 struct loop *next;
137 /* The number of times the latch of the loop is executed. This can be an
146 /* An integer guaranteed to bound the number of iterations of the loop
150 /* An integer giving the expected number of iterations of the loop. */
156 /* True if the loop can be parallel. */
163 /* Upper bound on number of iterations of a loop. */
166 /* Head of the cyclic list of the exits of the loop. */
170 /* Flags for state of loop structure. */
195 /* Maps edges to the list of their descriptions as loop exits. Edges
200 /* Pointer to root of loop hierarchy tree. */
201 struct loop *tree_root;
204 /* Loop recognition. */
209 void (*)(const struct loop *, FILE *, int), int);
210 extern void flow_loop_dump (const struct loop *, FILE *,
211 void (*)(const struct loop *, FILE *, int), int);
212 struct loop *alloc_loop (void);
213 extern void flow_loop_free (struct loop *);
214 int flow_loop_nodes_find (basic_block, struct loop *);
221 /* Loop data structure manipulation/querying. */
222 extern void flow_loop_tree_node_add (struct loop *, struct loop *);
223 extern void flow_loop_tree_node_remove (struct loop *);
224 extern void add_loop (struct loop *, struct loop *);
225 extern bool flow_loop_nested_p (const struct loop *, const struct loop *);
226 extern bool flow_bb_inside_loop_p (const struct loop *, const_basic_block);
227 extern struct loop * find_common_loop (struct loop *, struct loop *);
228 struct loop *superloop_at_depth (struct loop *, unsigned);
230 extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights_d *);
231 extern int num_loop_insns (const struct loop *);
232 extern int average_num_loop_insns (const struct loop *);
233 extern unsigned get_loop_level (const struct loop *);
234 extern bool loop_exit_edge_p (const struct loop *, const_edge);
235 extern bool loop_exits_to_bb_p (struct loop *, basic_block);
236 extern bool loop_exits_from_bb_p (struct loop *, basic_block);
238 extern location_t get_loop_location (struct loop *loop);
241 extern basic_block *get_loop_body (const struct loop *);
242 extern unsigned get_loop_body_with_size (const struct loop *, basic_block *,
244 extern basic_block *get_loop_body_in_dom_order (const struct loop *);
245 extern basic_block *get_loop_body_in_bfs_order (const struct loop *);
246 extern basic_block *get_loop_body_in_custom_order (const struct loop *,
249 extern VEC (edge, heap) *get_loop_exit_edges (const struct loop *);
250 edge single_exit (const struct loop *);
251 extern unsigned num_loop_branches (const struct loop *);
253 extern edge loop_preheader_edge (const struct loop *);
254 extern edge loop_latch_edge (const struct loop *);
256 extern void add_bb_to_loop (basic_block, struct loop *);
259 extern void cancel_loop_tree (struct loop *);
260 extern void delete_loop (struct loop *);
268 basic_block create_preheader (struct loop *, int);
274 /* Loop analysis. */
275 extern bool just_once_each_iteration_p (const struct loop *, const_basic_block);
276 gcov_type expected_loop_iterations_unbounded (const struct loop *);
277 extern unsigned expected_loop_iterations (const struct loop *);
280 void estimate_numbers_of_iterations_loop (struct loop *, bool);
281 HOST_WIDE_INT estimated_loop_iterations_int (struct loop *, bool);
282 bool estimated_loop_iterations (struct loop *, bool, double_int *);
284 /* Loop manipulation. */
285 extern bool can_duplicate_loop_p (const struct loop *loop);
295 extern struct loop *create_empty_loop_on_edge (edge, tree, tree, tree, tree,
296 tree *, tree *, struct loop *);
297 extern struct loop * duplicate_loop (struct loop *, struct loop *);
298 extern void duplicate_subloops (struct loop *, struct loop *);
299 extern bool duplicate_loop_to_header_edge (struct loop *, edge,
302 extern struct loop *loopify (edge, edge,
305 struct loop * loop_version (struct loop *, void *,
308 void scale_loop_frequencies (struct loop *, int, int);
353 /* The description of an exit from the loop and of the number of iterations
358 /* The edge out of the loop. */
365 loop. */
368 /* True if the loop iterates the constant number of times. */
380 /* Assumptions under that the loop ends before reaching the latch,
384 /* Condition under that the loop is infinite. */
393 /* The number of iterations of the loop. */
397 extern void iv_analysis_loop_init (struct loop *);
403 extern void find_simple_exit (struct loop *, struct niter_desc *);
406 extern struct niter_desc *get_simple_loop_desc (struct loop *loop);
407 extern void free_simple_loop_desc (struct loop *loop);
410 simple_loop_desc (struct loop *loop)
412 return (struct niter_desc *) loop->aux;
415 /* Accessors for the loop structures. */
417 /* Returns the loop with index NUM from current_loops. */
419 static inline struct loop *
425 /* Returns the number of superloops of LOOP. */
428 loop_depth (const struct loop *loop)
430 return VEC_length (loop_p, loop->superloops);
433 /* Returns the immediate superloop of LOOP, or NULL if LOOP is the outermost
434 loop. */
436 static inline struct loop *
437 loop_outer (const struct loop *loop)
439 unsigned n = VEC_length (loop_p, loop->superloops);
444 return VEC_index (loop_p, loop->superloops, n - 1);
447 /* Returns true if LOOP has at least one exit edge. */
450 loop_has_exit_edges (const struct loop *loop)
452 return loop->exits->next->e != NULL;
467 ones and the fake loop that forms the root of the loop tree). */
505 /* Loop iterators. */
507 /* Flags for loop iteration. */
511 LI_INCLUDE_ROOT = 1, /* Include the fake root of the loop tree. */
524 /* The index of the actual loop. */
529 fel_next (loop_iterator *li, loop_p *loop)
536 *loop = get_loop (anum);
537 if (*loop)
542 *loop = NULL;
546 fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
548 struct loop *aloop;
556 *loop = NULL;
619 fel_next (li, loop);
622 #define FOR_EACH_LOOP(LI, LOOP, FLAGS) \
623 for (fel_init (&(LI), &(LOOP), FLAGS); \
624 (LOOP); \
625 fel_next (&(LI), &(LOOP)))
670 /* Register pressure estimation for induction variable optimizations & loop
675 /* Loop optimizer initialization. */
684 UAP_PEEL = 1, /* Enables loop peeling. */
692 extern bool finite_loop_p (struct loop *);