diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-13 17:28:43 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-13 17:28:43 +0000 |
commit | 903dae48bdeed6191d043cd56f2345d332916ee4 (patch) | |
tree | e16e6f08588cfad8cd3b6712bf30a607ac5f488d /gcc/tree-vrp.c | |
parent | 77beec480bdbed142d45a84de7bf61f265bdf3a2 (diff) | |
download | gcc-903dae48bdeed6191d043cd56f2345d332916ee4.tar.gz |
PR tree-optimization/22236
* tree-cfg.c (print_pred_bbs, print_succ_bbs): Correctly print
successors and predecessors.
* tree-chrec.c (chrec_convert): Before converting, check that
sequences don't wrap.
* tree-data-ref.c (compute_estimated_nb_iterations): Moved ...
(analyze_array): Extern.
(find_data_references_in_loop): Remove call to
compute_estimated_nb_iterations.
* tree-data-ref.h (analyze_array): Declared.
* tree-flow-inline.h (single_ssa_tree_operand, single_ssa_use_operand,
single_ssa_def_operand, zero_ssa_operands): Fix documentation.
* tree-flow.h (scev_probably_wraps_p): Declare with an extra parameter.
* tree-scalar-evolution.c (instantiate_parameters_1): Factor entry
condition.
* tree-ssa-loop-ivcanon.c: Fix documentation.
* tree-ssa-loop-ivopts.c (idx_find_step): Add a fixme note.
* tree-ssa-loop-niter.c (compute_estimated_nb_iterations): ... here.
(infer_loop_bounds_from_undefined): New.
(estimate_numbers_of_iterations_loop): Use
infer_loop_bounds_from_undefined.
(used_in_pointer_arithmetic_p): New.
(scev_probably_wraps_p): Pass an extra parameter. Call
used_in_pointer_arithmetic_p. Check that AT_STMT is not null.
(convert_step): Fix documentation.
* tree-vrp.c (adjust_range_with_scev): Call instantiate_parameters.
Use initial_condition_in_loop_num and evolution_part_in_loop_num
instead of CHREC_LEFT and CHREC_RIGHT. Adjust the call to
scev_probably_wraps_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103055 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 81fda73e7fd..0f7f6710433 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1534,29 +1534,31 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, tree stmt, tree var) { tree init, step, chrec; - bool init_is_max; + bool init_is_max, unknown_max; /* TODO. Don't adjust anti-ranges. An anti-range may provide better opportunities than a regular range, but I'm not sure. */ if (vr->type == VR_ANTI_RANGE) return; - chrec = analyze_scalar_evolution (loop, var); + chrec = instantiate_parameters (loop, analyze_scalar_evolution (loop, var)); if (TREE_CODE (chrec) != POLYNOMIAL_CHREC) return; - init = CHREC_LEFT (chrec); - step = CHREC_RIGHT (chrec); + init = initial_condition_in_loop_num (chrec, loop->num); + step = evolution_part_in_loop_num (chrec, loop->num); /* If STEP is symbolic, we can't know whether INIT will be the minimum or maximum value in the range. */ - if (!is_gimple_min_invariant (step)) + if (step == NULL_TREE + || !is_gimple_min_invariant (step)) return; /* Do not adjust ranges when chrec may wrap. */ if (scev_probably_wraps_p (chrec_type (chrec), init, step, stmt, cfg_loops->parray[CHREC_VARIABLE (chrec)], - &init_is_max)) + &init_is_max, &unknown_max) + || unknown_max) return; if (!POINTER_TYPE_P (TREE_TYPE (init)) |