Lines Matching refs:loop
119 struct loop *, VEC(tree,heap) *,
149 static tree find_induction_var_from_exit_cond (struct loop *);
150 static bool can_convert_to_perfect_nest (struct loop *);
298 print_lambda_loop (FILE * outfile, lambda_loop loop, int depth, in print_lambda_loop() argument
304 gcc_assert (loop); in print_lambda_loop()
306 expr = LL_LINEAR_OFFSET (loop); in print_lambda_loop()
307 step = LL_STEP (loop); in print_lambda_loop()
318 for (expr = LL_LOWER_BOUND (loop); expr != NULL; expr = LLE_NEXT (expr)) in print_lambda_loop()
321 for (expr = LL_UPPER_BOUND (loop); expr != NULL; expr = LLE_NEXT (expr)) in print_lambda_loop()
388 lambda_loop loop; in lambda_lattice_compute_base() local
398 loop = LN_LOOPS (nest)[i]; in lambda_lattice_compute_base()
399 gcc_assert (loop); in lambda_lattice_compute_base()
400 step = LL_STEP (loop); in lambda_lattice_compute_base()
416 expression = LL_LOWER_BOUND (loop); in lambda_lattice_compute_base()
490 lambda_loop loop; in compute_nest_using_fourier_motzkin() local
504 loop = lambda_loop_new (); in compute_nest_using_fourier_motzkin()
505 LN_LOOPS (auxillary_nest)[i] = loop; in compute_nest_using_fourier_motzkin()
506 LL_STEP (loop) = 1; in compute_nest_using_fourier_motzkin()
526 if (!lle_equal (LL_LOWER_BOUND (loop), in compute_nest_using_fourier_motzkin()
529 LLE_NEXT (expression) = LL_LOWER_BOUND (loop); in compute_nest_using_fourier_motzkin()
530 LL_LOWER_BOUND (loop) = expression; in compute_nest_using_fourier_motzkin()
549 if (!lle_equal (LL_UPPER_BOUND (loop), in compute_nest_using_fourier_motzkin()
552 LLE_NEXT (expression) = LL_UPPER_BOUND (loop); in compute_nest_using_fourier_motzkin()
553 LL_UPPER_BOUND (loop) = expression; in compute_nest_using_fourier_motzkin()
637 lambda_loop loop; in lambda_compute_auxillary_space() local
662 loop = LN_LOOPS (nest)[i]; in lambda_compute_auxillary_space()
665 if (LL_STEP (loop) > 0) in lambda_compute_auxillary_space()
666 expression = LL_LOWER_BOUND (loop); in lambda_compute_auxillary_space()
668 expression = LL_UPPER_BOUND (loop); in lambda_compute_auxillary_space()
697 if (LL_STEP (loop) > 0) in lambda_compute_auxillary_space()
698 expression = LL_UPPER_BOUND (loop); in lambda_compute_auxillary_space()
700 expression = LL_LOWER_BOUND (loop); in lambda_compute_auxillary_space()
1033 lambda_loop loop; in lambda_loopnest_transform() local
1088 loop = LN_LOOPS (target_nest)[i]; in lambda_loopnest_transform()
1089 expression = LL_LINEAR_OFFSET (loop); in lambda_loopnest_transform()
1172 depth_of_nest (struct loop *nest) in depth_of_nest()
1187 invariant_in_loop_and_outer_loops (struct loop *loop, tree op) in invariant_in_loop_and_outer_loops() argument
1191 if (loop->depth == 0) in invariant_in_loop_and_outer_loops()
1193 if (!expr_invariant_in_loop_p (loop, op)) in invariant_in_loop_and_outer_loops()
1195 if (loop->outer in invariant_in_loop_and_outer_loops()
1196 && !invariant_in_loop_and_outer_loops (loop->outer, op)) in invariant_in_loop_and_outer_loops()
1210 gcc_loop_to_lambda_loop (struct loop *loop, int depth, in gcc_loop_to_lambda_loop() argument
1230 inductionvar = find_induction_var_from_exit_cond (loop); in gcc_loop_to_lambda_loop()
1231 exit_cond = get_loop_exit_condition (loop); in gcc_loop_to_lambda_loop()
1283 (loop, analyze_scalar_evolution (loop, PHI_RESULT (phi))); in gcc_loop_to_lambda_loop()
1293 step = evolution_part_in_loop_num (access_fn, loop->num); in gcc_loop_to_lambda_loop()
1325 if (flow_bb_inside_loop_p (loop, PHI_ARG_EDGE (phi, 0)->src) in gcc_loop_to_lambda_loop()
1326 && flow_bb_inside_loop_p (loop, PHI_ARG_EDGE (phi, 1)->src)) in gcc_loop_to_lambda_loop()
1336 if (flow_bb_inside_loop_p (loop, PHI_ARG_EDGE (phi, 0)->src)) in gcc_loop_to_lambda_loop()
1363 && invariant_in_loop_and_outer_loops (loop, TREE_OPERAND (test, 1))) in gcc_loop_to_lambda_loop()
1366 && invariant_in_loop_and_outer_loops (loop, TREE_OPERAND (test, 0))) in gcc_loop_to_lambda_loop()
1421 find_induction_var_from_exit_cond (struct loop *loop) in find_induction_var_from_exit_cond() argument
1423 tree expr = get_loop_exit_condition (loop); in find_induction_var_from_exit_cond()
1437 if (expr_invariant_in_loop_p (loop, TREE_OPERAND (test, 0))) in find_induction_var_from_exit_cond()
1439 else if (expr_invariant_in_loop_p (loop, TREE_OPERAND (test, 1))) in find_induction_var_from_exit_cond()
1461 struct loop *loop_nest, in gcc_loopnest_to_lambda_loopnest()
1466 struct loop *temp = loop_nest; in gcc_loopnest_to_lambda_loopnest()
1807 lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, in lambda_loopnest_to_gcc_loopnest()
1813 struct loop *temp; in lambda_loopnest_to_gcc_loopnest()
1992 phi_loop_edge_uses_def (struct loop *loop, tree phi, tree def) in phi_loop_edge_uses_def() argument
1996 if (flow_bb_inside_loop_p (loop, PHI_ARG_EDGE (phi, i)->src)) in phi_loop_edge_uses_def()
2021 stmt_is_bumper_for_loop (struct loop *loop, tree stmt) in stmt_is_bumper_for_loop() argument
2037 if (phi_loop_edge_uses_def (loop, use, def)) in stmt_is_bumper_for_loop()
2073 perfect_nest_p (struct loop *loop) in perfect_nest_p() argument
2079 if (!loop->inner) in perfect_nest_p()
2081 bbs = get_loop_body (loop); in perfect_nest_p()
2082 exit_cond = get_loop_exit_condition (loop); in perfect_nest_p()
2083 for (i = 0; i < loop->num_nodes; i++) in perfect_nest_p()
2085 if (bbs[i]->loop_father == loop) in perfect_nest_p()
2093 || stmt_is_bumper_for_loop (loop, stmt)) in perfect_nest_p()
2102 if (loop->inner) in perfect_nest_p()
2103 return perfect_nest_p (loop->inner); in perfect_nest_p()
2114 replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x, in replace_uses_equiv_to_x_with_y() argument
2137 scev = instantiate_parameters (loop, in replace_uses_equiv_to_x_with_y()
2138 analyze_scalar_evolution (loop, use)); in replace_uses_equiv_to_x_with_y()
2143 step = evolution_part_in_loop_num (scev, loop->num); in replace_uses_equiv_to_x_with_y()
2163 init = initial_condition_in_loop_num (scev, loop->num); in replace_uses_equiv_to_x_with_y()
2209 exit_phi_for_loop_p (struct loop *loop, tree stmt) in exit_phi_for_loop_p() argument
2214 || bb_for_stmt (stmt) != loop->single_exit->dest) in exit_phi_for_loop_p()
2224 can_put_in_inner_loop (struct loop *inner, tree stmt) in can_put_in_inner_loop()
2249 can_put_after_inner_loop (struct loop *loop, tree stmt) in can_put_after_inner_loop() argument
2259 if (!exit_phi_for_loop_p (loop, USE_STMT (use_p))) in can_put_after_inner_loop()
2265 loop->inner->header) in can_put_after_inner_loop()
2266 && !can_put_in_inner_loop (loop->inner, stmt)) in can_put_after_inner_loop()
2280 can_convert_to_perfect_nest (struct loop *loop) in can_convert_to_perfect_nest() argument
2289 if (!loop->inner || loop->inner->inner) in can_convert_to_perfect_nest()
2292 bbs = get_loop_body (loop); in can_convert_to_perfect_nest()
2293 exit_condition = get_loop_exit_condition (loop); in can_convert_to_perfect_nest()
2294 for (i = 0; i < loop->num_nodes; i++) in can_convert_to_perfect_nest()
2296 if (bbs[i]->loop_father == loop) in can_convert_to_perfect_nest()
2304 || stmt_is_bumper_for_loop (loop, stmt)) in can_convert_to_perfect_nest()
2322 (loop, analyze_scalar_evolution (loop, op0)); in can_convert_to_perfect_nest()
2327 tree step = evolution_part_in_loop_num (scev, loop->num); in can_convert_to_perfect_nest()
2338 == loop->inner) in can_convert_to_perfect_nest()
2348 == loop->inner) in can_convert_to_perfect_nest()
2364 == loop->inner) in can_convert_to_perfect_nest()
2370 if (can_put_in_inner_loop (loop->inner, stmt) in can_convert_to_perfect_nest()
2371 || can_put_after_inner_loop (loop, stmt)) in can_convert_to_perfect_nest()
2381 loop->inner->header)) in can_convert_to_perfect_nest()
2390 exitdest = loop->single_exit->dest; in can_convert_to_perfect_nest()
2443 struct loop *loop, in perfect_nestify() argument
2457 struct loop *newloop; in perfect_nestify()
2466 olddest = loop->single_exit->dest; in perfect_nestify()
2467 preheaderbb = loop_split_edge_with (loop->single_exit, NULL); in perfect_nestify()
2517 newloop = duplicate_loop (loops, loop, olddest->loop_father); in perfect_nestify()
2527 loop->single_exit->src); in perfect_nestify()
2562 bbs = get_loop_body_in_dom_order (loop); in perfect_nestify()
2567 for (i = loop->num_nodes - 1; i >= 0 ; i--) in perfect_nestify()
2570 if (bbs[i]->loop_father == loop) in perfect_nestify()
2583 if (dominated_by_p (CDI_DOMINATORS, loop->inner->header, bbs[i])) in perfect_nestify()
2586 = bsi_after_labels (loop->inner->header); in perfect_nestify()
2594 || stmt_is_bumper_for_loop (loop, stmt)) in perfect_nestify()
2615 || stmt_is_bumper_for_loop (loop, stmt)) in perfect_nestify()
2622 (loop, stmt, oldivvar, VEC_index (int, steps, 0), ivvar, in perfect_nestify()
2640 return perfect_nest_p (loop); in perfect_nestify()