From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13652 invoked by alias); 23 Apr 2014 09:43:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13643 invoked by uid 89); 23 Apr 2014 09:43:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 23 Apr 2014 09:43:48 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A13B9AC4A for ; Wed, 23 Apr 2014 09:43:45 +0000 (UTC) Date: Wed, 23 Apr 2014 09:46:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH][RFC] (Auto)-add TODO_verify_il Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2014-04/txt/msg01389.txt.bz2 This goes forward with an old idea of doing IL verification after each pass. This is a baby-step towards it by adding TODO_verify_il, auto-added by the pass manager at the todo-after position. It moves loop-closed SSA verification (which was done whenever loops were in loop-closed SSA form - before _and_ after a pass...) under the TODO_verify_il umbrella. Bootstrap/regtest ongoing on x86_64-unknown-linux-gnu. I'm proposing to remove TODO_verify_* by enabling them under TODO_verify_il. Any comments? Thansk, Richard. 2014-04-23 Richard Biener * tree-pass.h (TODO_verify_il): Define. (TODO_verify_all): Complete properly. * passes.c (execute_function_todo): Move existing loop-closed SSA verification under TODO_verify_il. (execute_one_pass): Trigger TODO_verify_il at todo-after time. Index: gcc/tree-pass.h =================================================================== --- gcc/tree-pass.h (revision 209677) +++ gcc/tree-pass.h (working copy) @@ -234,6 +234,7 @@ protected: #define TODO_verify_flow (1 << 3) #define TODO_verify_stmts (1 << 4) #define TODO_cleanup_cfg (1 << 5) +#define TODO_verify_il (1 << 6) #define TODO_dump_symtab (1 << 7) #define TODO_remove_functions (1 << 8) #define TODO_rebuild_frequencies (1 << 9) @@ -309,7 +310,8 @@ protected: | TODO_update_ssa_only_virtuals) #define TODO_verify_all \ - (TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts) + (TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts | TODO_verify_il \ + | TODO_verify_rtl_sharing) /* Register pass info. */ Index: gcc/passes.c =================================================================== --- gcc/passes.c (revision 209677) +++ gcc/passes.c (working copy) @@ -1777,8 +1777,7 @@ execute_function_todo (void *data) return; #if defined ENABLE_CHECKING - if (flags & TODO_verify_ssa - || (current_loops && loops_state_satisfies_p (LOOP_CLOSED_SSA))) + if (flags & TODO_verify_ssa) { verify_gimple_in_cfg (cfun); verify_ssa (true); @@ -1787,8 +1786,18 @@ execute_function_todo (void *data) 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_il) + { + if (current_loops + && loops_state_satisfies_p (LOOP_CLOSED_SSA)) + { + if (!(flags & (TODO_verify_stmts|TODO_verify_ssa))) + verify_gimple_in_cfg (cfun); + if (!(flags & TODO_verify_ssa)) + verify_ssa (true); + verify_loop_closed_ssa (false); + } + } if (flags & TODO_verify_rtl_sharing) verify_rtl_sharing (); #endif @@ -2170,7 +2179,7 @@ execute_one_pass (opt_pass *pass) check_profile_consistency (pass->static_pass_number, 0, true); /* Run post-pass cleanup and verification. */ - execute_todo (todo_after | pass->todo_flags_finish); + execute_todo (todo_after | pass->todo_flags_finish | TODO_verify_il); if (profile_report && cfun && (cfun->curr_properties & PROP_cfg)) check_profile_consistency (pass->static_pass_number, 1, true);