summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-06 19:20:47 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-06 19:20:47 +0000
commitca77c6ec2d25206fe9064d190e00b4abe1cf9fd9 (patch)
treeaf5aaa660a0bf216deaa0abaff2ff41c36952f16 /gcc/tree-ssa-loop-manip.c
parenta29ec3eb5f80f228a12550e1ce7a1448c4550e4e (diff)
downloadgcc-ca77c6ec2d25206fe9064d190e00b4abe1cf9fd9.tar.gz
Avoid calling verify_ssa twice in verify_loop_closed_ssa.
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index fd8495c77f7..94caad0db56 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
}