Commit 510dbcce by Richard Guenther Committed by Richard Biener

cfgloop.c (verify_loop_structure): Verify dominators before using them.

2012-03-05  Richard Guenther  <rguenther@suse.de>

	* cfgloop.c (verify_loop_structure): Verify dominators before
	using them.
	* graphite-clast-to-gimple.c (graphite_verify): Do not verify
	dominators from here.
	* graphite-scop-detection.c (create_sese_edges): Likewise.
	* loop-doloop.c (doloop_optimize_loops): Likewise.
	* loop-init.c (loop_optimizer_init): Likewise.
	* loop-unroll.c (unroll_and_peel_loops): Likewise.
	* loop-unswitch.c (unswitch_loops): Likewise.
	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
	* tree-parloops.c (parallelize_loops): Likewise.  Verify
	only when checking is enabled.
	* tree-loop-distribution.c (tree_loop_distribution): Likewise.

From-SVN: r184937
parent 50bcfce0
2012-03-05 Richard Guenther <rguenther@suse.de>
* cfgloop.c (verify_loop_structure): Verify dominators before
using them.
* graphite-clast-to-gimple.c (graphite_verify): Do not verify
dominators from here.
* graphite-scop-detection.c (create_sese_edges): Likewise.
* loop-doloop.c (doloop_optimize_loops): Likewise.
* loop-init.c (loop_optimizer_init): Likewise.
* loop-unroll.c (unroll_and_peel_loops): Likewise.
* loop-unswitch.c (unswitch_loops): Likewise.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
* tree-parloops.c (parallelize_loops): Likewise. Verify
only when checking is enabled.
* tree-loop-distribution.c (tree_loop_distribution): Likewise.
2012-03-05 Bernd Schmidt <bernds@codesourcery.com> 2012-03-05 Bernd Schmidt <bernds@codesourcery.com>
* genautomata.c (parse_automata_opt): New static function. * genautomata.c (parse_automata_opt): New static function.
......
...@@ -1318,6 +1318,9 @@ verify_loop_structure (void) ...@@ -1318,6 +1318,9 @@ verify_loop_structure (void)
loop_iterator li; loop_iterator li;
struct loop_exit *exit, *mexit; struct loop_exit *exit, *mexit;
/* We need up-to-date dominators, verify them. */
verify_dominators (CDI_DOMINATORS);
/* Check sizes. */ /* Check sizes. */
sizes = XCNEWVEC (unsigned, num); sizes = XCNEWVEC (unsigned, num);
sizes[0] = 2; sizes[0] = 2;
......
...@@ -55,7 +55,6 @@ graphite_verify (void) ...@@ -55,7 +55,6 @@ graphite_verify (void)
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_loop_structure (); verify_loop_structure ();
verify_dominators (CDI_DOMINATORS);
verify_loop_closed_ssa (true); verify_loop_closed_ssa (true);
#endif #endif
} }
......
...@@ -1026,7 +1026,6 @@ create_sese_edges (VEC (sd_region, heap) *regions) ...@@ -1026,7 +1026,6 @@ create_sese_edges (VEC (sd_region, heap) *regions)
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_loop_structure (); verify_loop_structure ();
verify_dominators (CDI_DOMINATORS);
verify_ssa (false); verify_ssa (false);
#endif #endif
} }
......
...@@ -747,7 +747,6 @@ doloop_optimize_loops (void) ...@@ -747,7 +747,6 @@ doloop_optimize_loops (void)
iv_analysis_done (); iv_analysis_done ();
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
#endif #endif
} }
......
...@@ -91,7 +91,6 @@ loop_optimizer_init (unsigned flags) ...@@ -91,7 +91,6 @@ loop_optimizer_init (unsigned flags)
flow_loops_dump (dump_file, NULL, 1); flow_loops_dump (dump_file, NULL, 1);
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
#endif #endif
} }
......
...@@ -198,7 +198,6 @@ unroll_and_peel_loops (int flags) ...@@ -198,7 +198,6 @@ unroll_and_peel_loops (int flags)
if (check) if (check)
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
#endif #endif
} }
...@@ -255,7 +254,6 @@ peel_loops_completely (int flags) ...@@ -255,7 +254,6 @@ peel_loops_completely (int flags)
{ {
peel_loop_completely (loop); peel_loop_completely (loop);
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
#endif #endif
} }
......
...@@ -149,7 +149,6 @@ unswitch_loops (void) ...@@ -149,7 +149,6 @@ unswitch_loops (void)
{ {
unswitch_single_loop (loop, NULL_RTX, 0); unswitch_single_loop (loop, NULL_RTX, 0);
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
#endif #endif
} }
......
...@@ -1293,7 +1293,9 @@ tree_loop_distribution (void) ...@@ -1293,7 +1293,9 @@ tree_loop_distribution (void)
fprintf (dump_file, "Loop %d is the same.\n", num); fprintf (dump_file, "Loop %d is the same.\n", num);
} }
#ifdef ENABLE_CHECKING
verify_loop_structure (); verify_loop_structure ();
#endif
VEC_free (gimple, heap, work_list); VEC_free (gimple, heap, work_list);
} }
......
...@@ -2226,10 +2226,11 @@ parallelize_loops (void) ...@@ -2226,10 +2226,11 @@ parallelize_loops (void)
} }
gen_parallel_loop (loop, reduction_list, gen_parallel_loop (loop, reduction_list,
n_threads, &niter_desc); n_threads, &niter_desc);
#ifdef ENABLE_CHECKING
verify_flow_info (); verify_flow_info ();
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
verify_loop_closed_ssa (true); verify_loop_closed_ssa (true);
#endif
} }
free_stmt_vec_info_vec (); free_stmt_vec_info_vec ();
......
...@@ -1096,7 +1096,6 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, ...@@ -1096,7 +1096,6 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_flow_info (); verify_flow_info ();
verify_dominators (CDI_DOMINATORS);
verify_loop_structure (); verify_loop_structure ();
verify_loop_closed_ssa (true); verify_loop_closed_ssa (true);
#endif #endif
......
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