Skip to content
Snippets Groups Projects
Commit f2d6beb7 authored by Jan Hubicka's avatar Jan Hubicka
Browse files

Unloop loops that no longer loops in tree-ssa-loop-ch

I noticed this after adding sanity check that the upper bound on number
of iterations never drop to -1.  It seems to be relatively common case
(happening few hundred times in testsuite and also during bootstrap)
that loop-ch duplicates enough so the loop itself no longer loops.

This is later detected in loop unrolling but since we test the number
of iterations anyway it seems better to do that earlier.

	* cfgloopmanip.h (unloop_loops): Export.
	* tree-ssa-loop-ch.cc (ch_base::copy_headers): Unloop loops
	that no longer loop.
	* tree-ssa-loop-ivcanon.cc (unloop_loops): Export; do not free
	vectors of loops to unloop.
	(canonicalize_induction_variables): Free vectors here.
	(tree_unroll_loops_completely): Free vectors here.
parent 65369ab6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment