From e6845c238200c37250282413728488871a8ffea5 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Fri, 1 Oct 2004 11:06:06 +0200 Subject: tree-chrec.c (chrec_fold_plus_poly_poly, [...]): Use fold_convert or build_int_cst_type instead od fonvert. * tree-chrec.c (chrec_fold_plus_poly_poly, chrec_fold_plus_1, chrec_fold_multiply): Use fold_convert or build_int_cst_type instead od fonvert. * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop, add_to_evolution, set_nb_iterations_in_loop, follow_ssa_edge_in_rhs, follow_ssa_edge_in_rhs): Ditto. * tree-ssa-loop-ivopts.c (struct iv): Add base_object field. (dump_iv): Dump base_object. (dump_use, dump_cand): Use dump_iv. (determine_base_object): New function. (alloc_iv): Initialize base_object field. (record_use): Clear the ssa_name field of iv. (get_computation_cost_at): Do not use difference of addresses of two different objects. (may_eliminate_iv): Do not require the loop to have just single exit. * tree-ssa-loop-niter.c (zero_p): Do not check for overflows. (nonzero_p): New function. (inverse, number_of_iterations_cond, simplify_using_outer_evolutions, tree_simplify_using_condition, simplify_using_initial_conditions, loop_niter_by_eval, find_loop_niter_by_eval, estimate_numbers_of_iterations_loop, compare_trees, upper_bound_in_type, lower_bound_in_type, can_count_iv_in_wider_type_bound): Use buildN instead of build. Use fold_convert or build_int_cst_type instead of convert. Use (non)zero_p instead of integer_(non)zerop. From-SVN: r88388 --- gcc/tree-scalar-evolution.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc/tree-scalar-evolution.c') diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 35d2fe9..e2d4297 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -506,9 +506,8 @@ compute_overall_effect_of_inner_loop (struct loop *loop, tree evolution_fn) /* Number of iterations is off by one (the ssa name we analyze must be defined before the exit). */ nb_iter = chrec_fold_minus (chrec_type (nb_iter), - nb_iter, - fold_convert (chrec_type (nb_iter), - integer_one_node)); + nb_iter, + build_int_cst_type (chrec_type (nb_iter), 1)); /* evolution_fn is the evolution function in LOOP. Get its value in the nb_iter-th iteration. */ @@ -896,7 +895,7 @@ add_to_evolution (unsigned loop_nb, if (code == MINUS_EXPR) to_add = chrec_fold_multiply (type, to_add, - fold_convert (type, integer_minus_one_node)); + build_int_cst_type (type, -1)); res = add_to_evolution_1 (loop_nb, chrec_before, to_add); @@ -916,7 +915,9 @@ static inline tree set_nb_iterations_in_loop (struct loop *loop, tree res) { - res = chrec_fold_plus (chrec_type (res), res, integer_one_node); + res = chrec_fold_plus (chrec_type (res), res, + build_int_cst_type (chrec_type (res), 1)); + /* FIXME HWI: However we want to store one iteration less than the count of the loop in order to be compatible with the other nb_iter computations in loop-iv. This also allows the @@ -1209,8 +1210,7 @@ follow_ssa_edge_in_rhs (struct loop *loop, (loop->num, chrec_fold_multiply (type_rhs, *evolution_of_loop, - fold_convert (type_rhs, - integer_minus_one_node)), + build_int_cst_type (type_rhs, -1)), PLUS_EXPR, rhs0); } } @@ -1241,7 +1241,7 @@ follow_ssa_edge_in_rhs (struct loop *loop, (loop->num, chrec_fold_multiply (type_rhs, *evolution_of_loop, - fold_convert (type_rhs, integer_minus_one_node)), + build_int_cst_type (type_rhs, -1)), PLUS_EXPR, rhs0); } -- cgit v1.1