summaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-01 09:06:06 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-01 09:06:06 +0000
commit065d134ec95f961b147c007241aa76753e691642 (patch)
tree7e352a964e8d59a79b5a87f2f3a25bb04f957d6a /gcc/tree-scalar-evolution.c
parenta8de373224425ffefd70fc9194124b79ccb9306a (diff)
downloadgcc-065d134ec95f961b147c007241aa76753e691642.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 35d2fe9ca8b..e2d42979091 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);
}