Lines Matching defs:loop

70 #include "tree-ssa-loop-manip.h"
71 #include "tree-ssa-loop-niter.h"
285 /* Look for ANNOTATE calls with loop annotation kind in BB; if found, remove
290 replace_loop_annotate_in_block (basic_block bb, struct loop *loop)
310 loop->safelen = INT_MAX;
313 loop->dont_vectorize = true;
316 loop->force_vectorize = true;
329 /* Look for ANNOTATE calls with loop annotation kind; if found, remove
330 them and propagate the information to the loop. We assume that the
331 annotations come immediately before the condition of the loop. */
336 struct loop *loop;
341 FOR_EACH_LOOP (loop, 0)
344 replace_loop_annotate_in_block (loop->header, loop);
347 if (loop->latch)
348 replace_loop_annotate_in_block (loop->latch, loop);
351 /* Remove IFN_ANNOTATE. Safeguard for the case loop->latch == NULL. */
373 warning_at (gimple_location (stmt), 0, "ignoring loop annotation");
1737 /* Protect simple loop latches. We only want to avoid merging
1738 the latch with the loop header or with a block in another
1739 loop in this case. */
1849 /* Also update the trees stored in loop structures. */
1852 struct loop *loop;
1854 FOR_EACH_LOOP (loop, 0)
1856 substitute_in_loop_info (loop, name, val);
1883 /* In case we maintain loop closed ssa form, do not propagate arguments
1884 of loop exit phi nodes. */
2080 struct loop *loop = bb->loop_father;
2082 /* If a loop gets removed, clean up the information associated
2084 if (loop->latch == bb
2085 || loop->header == bb)
2086 free_numbers_of_iterations_estimates_loop (loop);
4584 its address taken. This does not affect the loop itself
5895 /* During loop unrolling the target of the latch edge is copied.
5965 to the duplicate of the region. Dominance and loop information is
5982 struct loop *loop = entry->dest->loop_father;
5999 same loop. */
6000 if (region[i]->loop_father != loop)
6004 && region[i] == loop->header)
6008 /* In case the function is used for loop header copying (which is the primary
6010 if (loop->header == entry->dest)
6014 if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit->src))
6026 set_loop_copy (loop, loop_outer (loop));
6028 set_loop_copy (loop, loop);
6065 copy_bbs (region, n_region, region_copy, &exit, 1, &exit_copy, loop,
6084 loop->header = exit->dest;
6085 loop->latch = exit->src;
6165 struct loop *loop = exit->dest->loop_father;
6166 struct loop *orig_loop = entry->dest->loop_father;
6179 struct loop *target, *aloop, *cloop;
6189 set_loop_copy (orig_loop, loop);
6191 target= loop;
6272 /* Register the new edge from SWITCH_BB in loop exit lists. */
6635 /* Move BB from its current loop to the copy in the new function. */
6638 struct loop *new_loop = (struct loop *)bb->loop_father->aux;
6866 /* Fixup the loop arrays and numbers after moving LOOP and its subloops
6871 struct loop *loop)
6873 /* Discard it from the old loop array. */
6874 (*get_loops (fn1))[loop->num] = NULL;
6876 /* Place it in the new loop array, assigning it a new number. */
6877 loop->num = number_of_loops (fn2);
6878 vec_safe_push (loops_for_fn (fn2)->larray, loop);
6881 for (loop = loop->inner; loop; loop = loop->next)
6882 fixup_loop_arrays_after_move (fn1, fn2, loop);
6973 struct loop *loop = entry_bb->loop_father;
6974 struct loop *loop0 = get_loop (saved_cfun, 0);
7063 /* Initialize an empty loop tree. */
7069 /* Move the outlined loop tree part. */
7075 struct loop *this_loop = bb->loop_father;
7076 struct loop *outer = loop_outer (this_loop);
7077 if (outer == loop
7080 to the outermost loop in saved_cfun, rather than
7084 if (outer != loop)
7091 else if (bb->loop_father == loop0 && loop0 != loop)
7094 /* Remove loop exits from the outlined region. */
7112 loop->aux = current_loops->tree_root;
7141 loop->aux = NULL;
7144 loop->num_nodes -= num_nodes;
7145 for (struct loop *outer = loop_outer (loop);
7152 struct loop *aloop;
7208 add_bb_to_loop (bb, loop);
7461 static void print_loop_and_siblings (FILE *, struct loop *, int, int);
7464 VERBOSITY level this outputs the contents of the loop, or just its
7468 print_loop (FILE *file, struct loop *loop, int indent, int verbosity)
7473 if (loop == NULL)
7480 /* Print loop's header. */
7481 fprintf (file, "%sloop_%d (", s_indent, loop->num);
7482 if (loop->header)
7483 fprintf (file, "header = %d", loop->header->index);
7489 if (loop->latch)
7490 fprintf (file, ", latch = %d", loop->latch->index);
7494 print_generic_expr (file, loop->nb_iterations, 0);
7496 if (loop->any_upper_bound)
7499 print_decu (loop->nb_iterations_upper_bound, file);
7502 if (loop->any_estimate)
7505 print_decu (loop->nb_iterations_estimate, file);
7509 /* Print loop's body. */
7514 if (bb->loop_father == loop)
7517 print_loop_and_siblings (file, loop->inner, indent + 2, verbosity);
7524 loop, or just its structure. */
7527 print_loop_and_siblings (FILE *file, struct loop *loop, int indent,
7530 if (loop == NULL)
7533 print_loop (file, loop, indent, verbosity);
7534 print_loop_and_siblings (file, loop->next, indent, verbosity);
7538 of a loop, pretty print the loop structure on FILE. */
7550 /* Dump a loop. */
7553 debug (struct loop &ref)
7559 debug (struct loop *ptr)
7567 /* Dump a loop verbosely. */
7570 debug_verbose (struct loop &ref)
7576 debug_verbose (struct loop *ptr)
7596 debug_loop (struct loop *loop, int verbosity)
7598 print_loop (stderr, loop, 0, verbosity);
7601 /* Print on stderr the code of loop number NUM, at some VERBOSITY
7829 /* If we are removing a path inside a non-root loop that may change
7830 loop ownership of blocks or remove loops. Mark loops for fixup. */
8195 gimple_duplicate_loop_to_header_edge, /* duplicate loop for trees */
8324 /* Update loop info. */