Improve comments in pass_tree_loop_init::execute
2015-11-17 Tom de Vries <tom@codesourcery.com>
* tree-ssa-loop.c (pass_tree_loop_init::execute): Improve comments.
---
gcc/tree-ssa-loop.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
@@ -276,12 +276,21 @@ public:
unsigned int
pass_tree_loop_init::execute (function *fun ATTRIBUTE_UNUSED)
{
+ /* When processing a loop in the loop pipeline, we should be able to assert
+ that:
+ (loops_state_satisfies_p (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS
+ | LOOP_CLOSED_SSA)
+ && scev_initialized_p ())
+ */
+
loop_optimizer_init (LOOPS_NORMAL
| LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
- /* We might discover new loops, e.g. when turning irreducible
- regions into reducible. */
+ /* Note that we run scev_initialize here even if number_of_loops () <= 1.
+ Even if we have no real loops now, we might discover new loops while
+ executing the loop pipeline, e.g. when turning irreducible regions into
+ reducible, in which case we still would need scev to be initialized. */
scev_initialize ();
return 0;