Lines Matching refs:loop

61 create_iv (tree base, tree step, tree var, struct loop *loop,  in create_iv()  argument
71 edge pe = loop_preheader_edge (loop); in create_iv()
138 phi = create_phi_node (vb, loop->header); in create_iv()
139 add_phi_arg (phi, initial, loop_preheader_edge (loop), UNKNOWN_LOCATION); in create_iv()
140 add_phi_arg (phi, va, loop_latch_edge (loop), UNKNOWN_LOCATION); in create_iv()
146 static inline struct loop *
147 find_sibling_superloop (struct loop *use_loop, struct loop *def_loop) in find_sibling_superloop()
186 struct loop *def_loop = def_bb->loop_father; in compute_live_loop_exits()
198 struct loop *use_loop = use_bb->loop_father; in compute_live_loop_exits()
224 struct loop *pred_loop = pred->loop_father; in compute_live_loop_exits()
258 for (struct loop *loop = def_loop; in compute_live_loop_exits() local
259 loop != current_loops->tree_root; in compute_live_loop_exits()
260 loop = loop_outer (loop)) in compute_live_loop_exits()
261 bitmap_ior_into (def_loop_exits, loop_exits[loop->num]); in compute_live_loop_exits()
283 struct loop *aloop = find_common_loop (def_bb->loop_father, in add_exit_phi()
347 struct loop *loop; in get_loops_exits() local
351 FOR_EACH_LOOP (loop, 0) in get_loops_exits()
353 vec<edge> exit_edges = get_loop_exit_edges (loop); in get_loops_exits()
354 loop_exits[loop->num] = BITMAP_ALLOC (&loop_renamer_obstack); in get_loops_exits()
356 bitmap_set_bit (loop_exits[loop->num], e->dest->index); in get_loops_exits()
373 struct loop *def_loop; in find_uses_to_rename_use()
522 find_uses_to_rename_in_loop (struct loop *loop, bitmap *use_blocks, in find_uses_to_rename_in_loop() argument
531 basic_block *bbs = get_loop_body (loop); in find_uses_to_rename_in_loop()
533 for (unsigned int i = 0; i < loop->num_nodes; i++) in find_uses_to_rename_in_loop()
614 int use_flags, struct loop *loop) in rewrite_into_loop_closed_ssa_1() argument
639 if (loop != NULL) in rewrite_into_loop_closed_ssa_1()
642 find_uses_to_rename_in_loop (loop, use_blocks, names_to_rename, in rewrite_into_loop_closed_ssa_1()
647 gcc_assert (loop == NULL); in rewrite_into_loop_closed_ssa_1()
688 rewrite_virtuals_into_loop_closed_ssa (struct loop *loop) in rewrite_virtuals_into_loop_closed_ssa() argument
690 rewrite_into_loop_closed_ssa_1 (NULL, 0, SSA_OP_VIRTUAL_USES, loop); in rewrite_virtuals_into_loop_closed_ssa()
744 verify_loop_closed_ssa (bool verify_ssa_p, struct loop *loop) in verify_loop_closed_ssa() argument
754 if (loop == NULL) in verify_loop_closed_ssa()
764 basic_block *bbs = get_loop_body (loop); in verify_loop_closed_ssa()
766 for (unsigned i = 0; i < loop->num_nodes; ++i) in verify_loop_closed_ssa()
817 ip_end_pos (struct loop *loop) in ip_end_pos() argument
819 return loop->latch; in ip_end_pos()
826 ip_normal_pos (struct loop *loop) in ip_normal_pos() argument
832 if (!single_pred_p (loop->latch)) in ip_normal_pos()
835 bb = single_pred (loop->latch); in ip_normal_pos()
842 if (exit->dest == loop->latch) in ip_normal_pos()
845 if (flow_bb_inside_loop_p (loop, exit->dest)) in ip_normal_pos()
857 standard_iv_increment_position (struct loop *loop, gimple_stmt_iterator *bsi, in standard_iv_increment_position() argument
860 basic_block bb = ip_normal_pos (loop), latch = ip_end_pos (loop); in standard_iv_increment_position()
905 gimple_duplicate_loop_to_header_edge (struct loop *loop, edge e, in gimple_duplicate_loop_to_header_edge() argument
918 if (!duplicate_loop_to_header_edge (loop, e, ndupl, wont_exit, in gimple_duplicate_loop_to_header_edge()
937 can_unroll_loop_p (struct loop *loop, unsigned factor, in can_unroll_loop_p() argument
948 exit = single_dom_exit (loop); in can_unroll_loop_p()
952 if (!number_of_iterations_exit (loop, exit, niter, false) in can_unroll_loop_p()
966 if (!can_duplicate_loop_p (loop)) in can_unroll_loop_p()
970 if (tree_num_loop_insns (loop, &eni_size_weights) * factor in can_unroll_loop_p()
984 determine_exit_conditions (struct loop *loop, struct tree_niter_desc *desc, in determine_exit_conditions() argument
1064 gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); in determine_exit_conditions()
1072 gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); in determine_exit_conditions()
1078 gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); in determine_exit_conditions()
1081 gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); in determine_exit_conditions()
1093 scale_dominated_blocks_in_loop (struct loop *loop, basic_block bb, in scale_dominated_blocks_in_loop() argument
1105 if (!flow_bb_inside_loop_p (loop, son)) in scale_dominated_blocks_in_loop()
1108 scale_dominated_blocks_in_loop (loop, son, num, den); in scale_dominated_blocks_in_loop()
1115 niter_for_unrolled_loop (struct loop *loop, unsigned factor) in niter_for_unrolled_loop() argument
1119 gcov_type est_niter = expected_loop_iterations_unbounded (loop, &profile_p); in niter_for_unrolled_loop()
1142 if (loop->any_upper_bound) in niter_for_unrolled_loop()
1145 widest_int bound = wi::udiv_floor (loop->nb_iterations_upper_bound, in niter_for_unrolled_loop()
1212 tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, in tree_transform_and_unroll_loop() argument
1224 struct loop *new_loop; in tree_transform_and_unroll_loop()
1234 gcov_type new_est_niter = niter_for_unrolled_loop (loop, factor); in tree_transform_and_unroll_loop()
1235 unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; in tree_transform_and_unroll_loop()
1238 determine_exit_conditions (loop, desc, factor, in tree_transform_and_unroll_loop()
1263 new_loop = loop_version (loop, enter_main_cond, NULL, prob_entry, in tree_transform_and_unroll_loop()
1274 split_edge (loop_latch_edge (loop)); in tree_transform_and_unroll_loop()
1275 exit_bb = single_pred (loop->latch); in tree_transform_and_unroll_loop()
1281 scale_dominated_blocks_in_loop (loop, exit->src, in tree_transform_and_unroll_loop()
1284 loop->header->count, in tree_transform_and_unroll_loop()
1285 loop->header->count in tree_transform_and_unroll_loop()
1286 - loop->header->count.apply_probability in tree_transform_and_unroll_loop()
1302 new_nonexit = single_pred_edge (loop->latch); in tree_transform_and_unroll_loop()
1306 scale_bbs_frequencies (&loop->latch, 1, new_nonexit->probability); in tree_transform_and_unroll_loop()
1308 old_entry = loop_preheader_edge (loop); in tree_transform_and_unroll_loop()
1310 old_latch = loop_latch_edge (loop); in tree_transform_and_unroll_loop()
1311 for (psi_old_loop = gsi_start_phis (loop->header), in tree_transform_and_unroll_loop()
1351 (*transform) (loop, data); in tree_transform_and_unroll_loop()
1360 (loop, loop_latch_edge (loop), factor - 1, in tree_transform_and_unroll_loop()
1375 freq_h = loop->header->count; in tree_transform_and_unroll_loop()
1376 freq_e = (loop_preheader_edge (loop))->count (); in tree_transform_and_unroll_loop()
1383 scale_loop_frequencies (loop, freq_e.probability_in (freq_h)); in tree_transform_and_unroll_loop()
1386 exit_bb = single_pred (loop->latch); in tree_transform_and_unroll_loop()
1393 new_nonexit = single_pred_edge (loop->latch); in tree_transform_and_unroll_loop()
1398 scale_bbs_frequencies (&loop->latch, 1, prob); in tree_transform_and_unroll_loop()
1404 create_iv (exit_base, exit_step, NULL_TREE, loop, in tree_transform_and_unroll_loop()
1413 checking_verify_loop_closed_ssa (true, loop); in tree_transform_and_unroll_loop()
1422 tree_unroll_loop (struct loop *loop, unsigned factor, in tree_unroll_loop() argument
1425 tree_transform_and_unroll_loop (loop, factor, exit, desc, in tree_unroll_loop()
1433 rewrite_phi_with_iv (loop_p loop, in rewrite_phi_with_iv() argument
1449 if (!simple_iv (loop, loop, res, &iv, true)) in rewrite_phi_with_iv()
1474 rewrite_all_phi_nodes_with_iv (loop_p loop, tree main_iv) in rewrite_all_phi_nodes_with_iv() argument
1477 basic_block *bbs = get_loop_body_in_dom_order (loop); in rewrite_all_phi_nodes_with_iv()
1480 for (i = 0; i < loop->num_nodes; i++) in rewrite_all_phi_nodes_with_iv()
1485 if (bb->loop_father != loop) in rewrite_all_phi_nodes_with_iv()
1489 rewrite_phi_with_iv (loop, &psi, &gsi, main_iv); in rewrite_all_phi_nodes_with_iv()
1505 canonicalize_loop_ivs (struct loop *loop, tree *nit, bool bump_in_latch) in canonicalize_loop_ivs() argument
1513 edge exit = single_dom_exit (loop); in canonicalize_loop_ivs()
1517 for (psi = gsi_start_phis (loop->header); in canonicalize_loop_ivs()
1550 gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); in canonicalize_loop_ivs()
1554 gsi = gsi_last_bb (loop->latch); in canonicalize_loop_ivs()
1556 gsi = gsi_last_nondebug_bb (loop->header); in canonicalize_loop_ivs()
1558 loop, &gsi, bump_in_latch, &var_before, NULL); in canonicalize_loop_ivs()
1560 rewrite_all_phi_nodes_with_iv (loop, var_before); in canonicalize_loop_ivs()