On Thu, Feb 21, 2013 at 7:37 AM, Richard Biener <rguent...@suse.de> wrote: > > 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).
Agreed. > Do people think that the fine-grained verification control > is actually useful or do you agree with me that it leads to > sloppiness? It leads to sloppiness. We should not allow fine grained checking. At most, we could throttle IL checking automatically depending on the chosen --enable-checking value at config time. For --enable-checking=release we could leave only the quickest and more fundamental checks. > > 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 (); I agree with Micha. Do the checks bottom up? IL -> CFG -> SSA -> LOOP. Diego.