aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog19
-rw-r--r--gcc/graphite-clast-to-gimple.c3
-rw-r--r--gcc/graphite-scop-detection.c4
-rw-r--r--gcc/graphite-sese-to-poly.c9
-rw-r--r--gcc/passes.c5
-rw-r--r--gcc/tree-flow.h2
-rw-r--r--gcc/tree-parloops.c2
-rw-r--r--gcc/tree-ssa-loop-manip.c12
8 files changed, 37 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1489840..419895f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,24 @@
2010-04-06 Sebastian Pop <sebastian.pop@amd.com>
+ * graphite-clast-to-gimple.c (graphite_verify): Remove redundant
+ call to verify_ssa. Invoke verify_loop_closed_ssa with an extra
+ argument.
+ * graphite-scop-detection.c (canonicalize_loop_closed_ssa_form): Same.
+ * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Same.
+ (rewrite_commutative_reductions_out_of_ssa): Same.
+ * passes.c (execute_function_todo): Call verify_ssa for every pass
+ in the LNO. Invoke verify_loop_closed_ssa with an extra argument.
+ * tree-flow.h (verify_loop_closed_ssa): Update declaration.
+ * tree-parloops.c (parallelize_loops): Invoke verify_loop_closed_ssa
+ with an extra argument.
+ * tree-ssa-loop-manip.c (check_loop_closed_ssa_stmt): Same. Call
+ verify_ssa only when the extra argument is true.
+ (gimple_duplicate_loop_to_header_edge): Invoke verify_loop_closed_ssa
+ with an extra argument.
+ (tree_transform_and_unroll_loop): Same.
+
+2010-04-06 Sebastian Pop <sebastian.pop@amd.com>
+
* passes.c (execute_function_todo): Call verify_loop_closed_ssa
for all the passes of the LNO having LOOP_CLOSED_SSA.
* tree-if-conv.c (pass_if_conversion): Remove TODO_verify_loops.
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index c01d899..819b924 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -65,8 +65,7 @@ graphite_verify (void)
verify_loop_structure ();
verify_dominators (CDI_DOMINATORS);
verify_dominators (CDI_POST_DOMINATORS);
- verify_ssa (false);
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
}
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index ce70c7e..36a5215 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -1303,7 +1303,7 @@ canonicalize_loop_closed_ssa_form (void)
loop_p loop;
#ifdef ENABLE_CHECKING
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
FOR_EACH_LOOP (li, loop, 0)
@@ -1313,7 +1313,7 @@ canonicalize_loop_closed_ssa_form (void)
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index d4bb8a3..17fb5a2 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2402,8 +2402,7 @@ rewrite_reductions_out_of_ssa (scop_p scop)
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_ssa (false);
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
FOR_EACH_BB (bb)
@@ -2413,8 +2412,7 @@ rewrite_reductions_out_of_ssa (scop_p scop)
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_ssa (false);
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
}
@@ -2868,8 +2866,7 @@ rewrite_commutative_reductions_out_of_ssa (sese region, sbitmap reductions)
gsi_commit_edge_inserts ();
update_ssa (TODO_update_ssa);
#ifdef ENABLE_CHECKING
- verify_ssa (false);
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
}
diff --git a/gcc/passes.c b/gcc/passes.c
index 0d42f9c..cbd605f 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1256,14 +1256,15 @@ execute_function_todo (void *data)
}
#if defined ENABLE_CHECKING
- if (flags & TODO_verify_ssa)
+ if (flags & TODO_verify_ssa
+ || (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA)))
verify_ssa (true);
if (flags & TODO_verify_flow)
verify_flow_info ();
if (flags & TODO_verify_stmts)
verify_stmts ();
if (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA))
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (false);
if (flags & TODO_verify_rtl_sharing)
verify_rtl_sharing ();
#endif
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 2e31595..6cd47e1 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -715,7 +715,7 @@ enum ev_direction scev_direction (const_tree);
void free_numbers_of_iterations_estimates (void);
void free_numbers_of_iterations_estimates_loop (struct loop *);
void rewrite_into_loop_closed_ssa (bitmap, unsigned);
-void verify_loop_closed_ssa (void);
+void verify_loop_closed_ssa (bool);
bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
void create_iv (tree, tree, tree, struct loop *, gimple_stmt_iterator *, bool,
tree *, tree *);
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 41cef89..b8a883f 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1970,7 +1970,7 @@ parallelize_loops (void)
verify_flow_info ();
verify_dominators (CDI_DOMINATORS);
verify_loop_structure ();
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
}
free_stmt_vec_info_vec ();
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index fd8495c..94caad0 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -440,10 +440,11 @@ check_loop_closed_ssa_stmt (basic_block bb, gimple stmt)
check_loop_closed_ssa_use (bb, var);
}
-/* Checks that invariants of the loop closed ssa form are preserved. */
+/* Checks that invariants of the loop closed ssa form are preserved.
+ Call verify_ssa when VERIFY_SSA_P is true. */
void
-verify_loop_closed_ssa (void)
+verify_loop_closed_ssa (bool verify_ssa_p)
{
basic_block bb;
gimple_stmt_iterator bsi;
@@ -454,7 +455,8 @@ verify_loop_closed_ssa (void)
if (number_of_loops () <= 1)
return;
- verify_ssa (false);
+ if (verify_ssa_p)
+ verify_ssa (false);
FOR_EACH_BB (bb)
{
@@ -616,7 +618,7 @@ gimple_duplicate_loop_to_header_edge (struct loop *loop, edge e,
#ifdef ENABLE_CHECKING
if (loops_state_satisfies_p (LOOP_CLOSED_SSA))
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
first_new_block = last_basic_block;
@@ -1095,7 +1097,7 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
verify_flow_info ();
verify_dominators (CDI_DOMINATORS);
verify_loop_structure ();
- verify_loop_closed_ssa ();
+ verify_loop_closed_ssa (true);
#endif
}