Commit f481cd49 by Jan Hubicka Committed by Jan Hubicka

* predict.c (predict_loops): Do not predict infinite loops.

From-SVN: r193101
parent 2749bf29
2012-11-02 Jan Hubicka <jh@suse.cz> 2012-11-02 Jan Hubicka <jh@suse.cz>
* predict.c (predict_loops): Do not predict infinite loops.
2012-11-02 Jan Hubicka <jh@suse.cz>
PR middle-end/55079 PR middle-end/55079
* tree-ssa-loop-niter.c (number_of_iterations_exit): Update * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
MAX field if NITER was folded to contant. MAX field if NITER was folded to contant.
...@@ -1403,6 +1403,11 @@ predict_loops (void) ...@@ -1403,6 +1403,11 @@ predict_loops (void)
exits = get_loop_exit_edges (loop); exits = get_loop_exit_edges (loop);
n_exits = VEC_length (edge, exits); n_exits = VEC_length (edge, exits);
if (!n_exits)
{
VEC_free (edge, heap, exits);
continue;
}
FOR_EACH_VEC_ELT (edge, exits, j, ex) FOR_EACH_VEC_ELT (edge, exits, j, ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment