diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-25 19:49:22 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-25 19:49:22 +0000 |
commit | d500fef3c51c2582fa29d4b8c0eab75c61bcac1f (patch) | |
tree | 442c3c77bcfc1b33de609ff61cc1e7e4b84bc7e8 /gcc/cfgloop.c | |
parent | 9af7fd5b82a9d848526e5f5edf0411d6dd2693fc (diff) | |
download | gcc-d500fef3c51c2582fa29d4b8c0eab75c61bcac1f.tar.gz |
* tree-ssa-loop-niter.c (compute_estimated_nb_iterations): Fix
off-by-one error.
(array_at_struct_end_p): New function.
(idx_infer_loop_bounds): Use it.
(estimate_numbers_of_iterations_loop): Export.
* predict.c (predict_loops): Use estimated_loop_iterations_int.
Do not use PRED_LOOP_EXIT on exits predicted by # of iterations.
(tree_estimate_probability): Call record_loop_exits.
* tree-data-ref.c (get_number_of_iters_for_loop): Replaced by ...
(estimated_loop_iterations, estimated_loop_iterations_int,
estimated_loop_iterations_tree): New functions.
(analyze_siv_subscript_cst_affine,
compute_overlap_steps_for_affine_1_2,
analyze_subscript_affine_affine): Use estimated_loop_iterations_int.
(analyze_miv_subscript): Use estimated_loop_iterations_tree.
* predict.def (PRED_LOOP_ITERATIONS): Update comment.
(PRED_LOOP_ITERATIONS_GUESSED): New.
* cfgloop.c (record_loop_exits): Do nothing if there are no loops.
* cfgloop.h (estimate_numbers_of_iterations_loop,
estimated_loop_iterations_int): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122316 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 62ee79c6cd1..12ce92cdd9e 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1038,6 +1038,9 @@ record_loop_exits (void) edge_iterator ei; edge e; + if (!current_loops) + return; + if (current_loops->state & LOOPS_HAVE_RECORDED_EXITS) return; current_loops->state |= LOOPS_HAVE_RECORDED_EXITS; |