This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] IL verification reorg


I'm trying to make IL verifying more streamlined - it's often
that passes have some random (or no) verification in their TODO
which makes pinning down issues to specific passes hard.

Thus I propose to unify the various TODO_verify_* flags into
a single one, TODO_verify_il, and based on what IL properties
are currently active perform checking.  That still leaves the
possibility to have no checking (with no TODO_verify_il).

Do people think that the fine-grained verification control
is actually useful or do you agree with me that it leads to
sloppiness?

Verification would be as outlined in the patch below - I didn't
yet adjust users of the then obsoleted TODO flags (another
possibility were to unconditionally verify - in the old days
all verification was controlled by --enable-checking options).

Thoughts?

Thanks,
Richard.

Index: gcc/passes.c
===================================================================
*** gcc/passes.c	(revision 196201)
--- gcc/passes.c	(working copy)
*************** execute_function_todo (void *data)
*** 1957,1976 ****
      return;
  
  #if defined ENABLE_CHECKING
!   if (flags & TODO_verify_ssa
!       || (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA)))
      {
!       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 (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA))
-     verify_loop_closed_ssa (false);
-   if (flags & TODO_verify_rtl_sharing)
-     verify_rtl_sharing ();
  #endif
  
    cfun->last_verified = flags & TODO_verify_all;
--- 1955,1982 ----
      return;
  
  #if defined ENABLE_CHECKING
!   if (flags & TODO_verify_il)
      {
!       if (cfun->curr_properties & PROP_cfg)
! 	verify_flow_info ();
!       if (cfun->curr_properties & PROP_loops)
! 	verify_loop_structure ();
!       if (cfun->curr_properties & PROP_gimple_any)
! 	{
! 	  if (cfun->curr_properties & PROP_cfg)
! 	    verify_gimple_in_cfg (cfun);
! 	  else
! 	    verify_gimple_in_seq (gimple_body (cfun->decl));
! 	}
!       if (cfun->curr_properties & PROP_ssa)
! 	{
! 	  verify_ssa ();
! 	  if (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA))
! 	    verify_loop_closed_ssa (false);
! 	}
!       if (cfun->curr_properties & PROP_rtl)
! 	verify_rtl_sharing ();
      }
  #endif
  
    cfun->last_verified = flags & TODO_verify_all;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]