Patchwork Fix PR52361 (a bit)

login
register
mail settings
Submitter Richard Guenther
Date Feb. 24, 2012, 10:35 a.m.
Message ID <alpine.LNX.2.00.1202241134220.18230@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/142810/
State New
Headers show

Comments

Richard Guenther - Feb. 24, 2012, 10:35 a.m.
This avoids redundant verify_gimple_in_cfg calls (the original idea
was to always verify gimple when we verify SSA form).

Scheduled for a bootstrap/regtest.

Richard.

2012-02-24  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52361
	* passes.c (execute_function_todo): When verifying SSA form
	verify gimple form first.
	* tree-ssa.c (verify_ssa): Do not verify gimple form here.

Patch

Index: gcc/passes.c
===================================================================
--- gcc/passes.c	(revision 184541)
+++ gcc/passes.c	(working copy)
@@ -1724,11 +1724,14 @@  execute_function_todo (void *data)
 #if defined ENABLE_CHECKING
   if (flags & TODO_verify_ssa
       || (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA)))
-    verify_ssa (true);
+    {
+      verify_gimple_in_cfg (cfun);
+      verify_ssa (true);
+    }
+  else if (flags & TODO_verify_stmts)
+    verify_gimple_in_cfg (cfun);
   if (flags & TODO_verify_flow)
     verify_flow_info ();
-  if (flags & TODO_verify_stmts)
-    verify_gimple_in_cfg (cfun);
   if (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA))
     verify_loop_closed_ssa (false);
   if (flags & TODO_verify_rtl_sharing)
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c	(revision 184541)
+++ gcc/tree-ssa.c	(working copy)
@@ -925,8 +925,6 @@  verify_ssa (bool check_modified_stmt)
 
   gcc_assert (!need_ssa_update_p (cfun));
 
-  verify_gimple_in_cfg (cfun);
-
   timevar_push (TV_TREE_SSA_VERIFY);
 
   /* Keep track of SSA names present in the IL.  */