Lines Matching refs:loops

34 static void duplicate_subloops (struct loops *, struct loop *, struct loop *);
35 static void copy_loops_to (struct loops *, struct loop **, int,
43 static void add_loop (struct loops *, struct loop *);
44 static void fix_loop_placements (struct loops *, struct loop *, bool *);
45 static bool fix_bb_placement (struct loops *, basic_block);
46 static void fix_bb_placements (struct loops *, basic_block, bool *);
47 static void place_new_loop (struct loops *, struct loop *);
50 static void unloop (struct loops *, struct loop *, bool *);
100 fix_bb_placement (struct loops *loops, basic_block bb) in fix_bb_placement() argument
104 struct loop *loop = loops->tree_root, *act; in fix_bb_placement()
141 fix_bb_placements (struct loops *loops, basic_block from, in fix_bb_placements() argument
157 if (base_loop == loops->tree_root) in fix_bb_placements()
190 if (!fix_bb_placement (loops, from)) in fix_bb_placements()
246 remove_path (struct loops *loops, edge e) in remove_path() argument
279 unloop (loops, e->src->loop_father, &irred_invalidated); in remove_path()
316 cancel_loop_tree (loops, rem_bbs[i]->loop_father); in remove_path()
349 fix_bb_placements (loops, from, &irred_invalidated); in remove_path()
350 fix_loop_placements (loops, from->loop_father, &irred_invalidated); in remove_path()
353 && (loops->state & LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS) != 0) in remove_path()
354 mark_irreducible_loops (loops); in remove_path()
369 add_loop (struct loops *loops, struct loop *loop) in add_loop() argument
375 place_new_loop (loops, loop); in add_loop()
411 loopify (struct loops *loops, edge latch_edge, edge header_edge, in loopify() argument
456 add_loop (loops, loop); in loopify()
511 unloop (struct loops *loops, struct loop *loop, bool *irred_invalidated) in unloop() argument
547 loops->parray[loop->num] = NULL; in unloop()
555 fix_bb_placements (loops, latch, &dummy); in unloop()
603 fix_loop_placements (struct loops *loops, struct loop *loop, in fix_loop_placements() argument
619 fix_bb_placements (loops, loop_preheader_edge (loop)->src, in fix_loop_placements()
627 place_new_loop (struct loops *loops, struct loop *loop) in place_new_loop() argument
629 loops->parray = in place_new_loop()
630 xrealloc (loops->parray, (loops->num + 1) * sizeof (struct loop *)); in place_new_loop()
631 loops->parray[loops->num] = loop; in place_new_loop()
633 loop->num = loops->num++; in place_new_loop()
639 duplicate_loop (struct loops *loops, struct loop *loop, struct loop *target) in duplicate_loop() argument
643 place_new_loop (loops, cloop); in duplicate_loop()
660 duplicate_subloops (struct loops *loops, struct loop *loop, struct loop *target) in duplicate_subloops() argument
666 cloop = duplicate_loop (loops, aloop, target); in duplicate_subloops()
667 duplicate_subloops (loops, aloop, cloop); in duplicate_subloops()
674 copy_loops_to (struct loops *loops, struct loop **copied_loops, int n, struct loop *target) in copy_loops_to() argument
681 aloop = duplicate_loop (loops, copied_loops[i], target); in copy_loops_to()
682 duplicate_subloops (loops, copied_loops[i], aloop); in copy_loops_to()
784 duplicate_loop_to_header_edge (struct loop *loop, edge e, struct loops *loops, in duplicate_loop_to_header_edge() argument
932 if (loops->state & LOOPS_HAVE_MARKED_SINGLE_EXITS) in duplicate_loop_to_header_edge()
946 copy_loops_to (loops, orig_loops, n_orig_loops, target); in duplicate_loop_to_header_edge()
1176 create_preheaders (struct loops *loops, int flags) in create_preheaders() argument
1179 for (i = 1; i < loops->num; i++) in create_preheaders()
1180 create_preheader (loops->parray[i], flags); in create_preheaders()
1181 loops->state |= LOOPS_HAVE_PREHEADERS; in create_preheaders()
1187 force_single_succ_latches (struct loops *loops) in force_single_succ_latches() argument
1193 for (i = 1; i < loops->num; i++) in force_single_succ_latches()
1195 loop = loops->parray[i]; in force_single_succ_latches()
1203 loops->state |= LOOPS_HAVE_SIMPLE_LATCHES; in force_single_succ_latches()
1294 loop_version (struct loops *loops, struct loop * loop, in loop_version() argument
1317 if (!cfg_hook_duplicate_loop_to_header_edge (loop, entry, loops, 1, in loop_version()
1340 nloop = loopify (loops, in loop_version()
1401 fix_loop_structure (struct loops *loops, bitmap changed_bbs) in fix_loop_structure() argument
1411 bb->loop_father = loops->tree_root; in fix_loop_structure()
1415 loops->tree_root->num_nodes = n_basic_blocks; in fix_loop_structure()
1416 for (i = 1; i < loops->num; i++) in fix_loop_structure()
1418 loop = loops->parray[i]; in fix_loop_structure()
1435 loops->parray[loop->num] = NULL; in fix_loop_structure()
1440 loop = loops->tree_root; in fix_loop_structure()
1448 && loop != loops->tree_root) in fix_loop_structure()
1450 if (loop == loops->tree_root) in fix_loop_structure()
1460 for (i = 1; i < loops->num; i++) in fix_loop_structure()
1462 loop = loops->parray[i]; in fix_loop_structure()
1484 if (loops->state & LOOPS_HAVE_MARKED_SINGLE_EXITS) in fix_loop_structure()
1485 mark_single_exit_loops (loops); in fix_loop_structure()
1486 if (loops->state & LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS) in fix_loop_structure()
1487 mark_irreducible_loops (loops); in fix_loop_structure()