From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26563 invoked by alias); 26 Apr 2009 21:39:44 -0000 Received: (qmail 26553 invoked by uid 22791); 26 Apr 2009 21:39:43 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 26 Apr 2009 21:39:38 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5276C74862; Sun, 26 Apr 2009 23:39:36 +0200 (CEST) Date: Sun, 26 Apr 2009 21:42:00 -0000 From: Michael Matz To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Subject: Re: [RFA] expand from SSA form (1/2) In-Reply-To: Message-ID: References: <49EE0F0C.1090101@redhat.com> <84fc9c000904240721he410b55p9776a1d033f82fc3@mail.gmail.com> <84fc9c000904240732i6743b0cas423a2ea9bc33387e@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes 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 X-SW-Source: 2009-04/txt/msg02069.txt.bz2 Hi, On Sun, 26 Apr 2009, Michael Matz wrote: > > It looks like the pass referencing this is now dead. Please remove > > this function and the pass structure. > > It is, but done as followup. > > > pass_mark_unused_blocks is no longer needed now as you remove unused > > locals and that marks blocks used? Please remove this pass (and its > > code). > > Also followup. Like so. Will commit if regstrapping passes. Ciao, Michael. -- * tree-pass.h (pass_del_ssa, pass_mark_used_blocks, pass_free_cfg_annotations, pass_free_datastructures): Remove decls. * gimple-low.c (mark_blocks_with_used_vars, mark_used_blocks, pass_mark_used_blocks): Remove. * tree-optimize.c (pass_free_datastructures, execute_free_cfg_annotations, pass_free_cfg_annotations): Remove. * passes.c (init_optimization_passes): Don't call pass_mark_used_blocks, remove dead code. Index: tree-pass.h =================================================================== --- tree-pass.h (Revision 146806) +++ tree-pass.h (Arbeitskopie) @@ -344,7 +344,6 @@ extern struct gimple_opt_pass pass_ch; extern struct gimple_opt_pass pass_ccp; extern struct gimple_opt_pass pass_phi_only_cprop; extern struct gimple_opt_pass pass_build_ssa; -extern struct gimple_opt_pass pass_del_ssa; extern struct gimple_opt_pass pass_build_alias; extern struct gimple_opt_pass pass_dominator; extern struct gimple_opt_pass pass_dce; @@ -380,7 +379,6 @@ extern struct gimple_opt_pass pass_phipr extern struct gimple_opt_pass pass_tree_ifcombine; extern struct gimple_opt_pass pass_dse; extern struct gimple_opt_pass pass_nrv; -extern struct gimple_opt_pass pass_mark_used_blocks; extern struct gimple_opt_pass pass_rename_ssa_copies; extern struct gimple_opt_pass pass_rest_of_compilation; extern struct gimple_opt_pass pass_sink_code; @@ -414,8 +412,6 @@ extern struct simple_ipa_opt_pass pass_i extern struct gimple_opt_pass pass_all_optimizations; extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing; -extern struct gimple_opt_pass pass_free_cfg_annotations; -extern struct gimple_opt_pass pass_free_datastructures; extern struct gimple_opt_pass pass_init_datastructures; extern struct gimple_opt_pass pass_fixup_cfg; Index: gimple-low.c =================================================================== --- gimple-low.c (Revision 146806) +++ gimple-low.c (Arbeitskopie) @@ -900,61 +900,3 @@ record_vars (tree vars) { record_vars_into (vars, current_function_decl); } - - -/* Mark BLOCK used if it has a used variable in it, then recurse over its - subblocks. */ - -static void -mark_blocks_with_used_vars (tree block) -{ - tree var; - tree subblock; - - if (!TREE_USED (block)) - { - for (var = BLOCK_VARS (block); - var; - var = TREE_CHAIN (var)) - { - if (TREE_USED (var)) - { - TREE_USED (block) = true; - break; - } - } - } - for (subblock = BLOCK_SUBBLOCKS (block); - subblock; - subblock = BLOCK_CHAIN (subblock)) - mark_blocks_with_used_vars (subblock); -} - -/* Mark the used attribute on blocks correctly. */ - -static unsigned int -mark_used_blocks (void) -{ - mark_blocks_with_used_vars (DECL_INITIAL (current_function_decl)); - return 0; -} - - -struct gimple_opt_pass pass_mark_used_blocks = -{ - { - GIMPLE_PASS, - "blocks", /* name */ - NULL, /* gate */ - mark_used_blocks, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_dump_func /* todo_flags_finish */ - } -}; Index: tree-optimize.c =================================================================== --- tree-optimize.c (Revision 146817) +++ tree-optimize.c (Arbeitskopie) @@ -236,51 +236,6 @@ execute_free_datastructures (void) return 0; } -struct gimple_opt_pass pass_free_datastructures = -{ - { - GIMPLE_PASS, - NULL, /* name */ - NULL, /* gate */ - execute_free_datastructures, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ - } -}; -/* Pass: free cfg annotations. */ - -static unsigned int -execute_free_cfg_annotations (void) -{ - return 0; -} - -struct gimple_opt_pass pass_free_cfg_annotations = -{ - { - GIMPLE_PASS, - NULL, /* name */ - NULL, /* gate */ - execute_free_cfg_annotations, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_NONE, /* tv_id */ - PROP_cfg, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ - } -}; - /* Pass: fixup_cfg. IPA passes, compilation of earlier functions or inlining might have changed some properties, such as marked functions nothrow. Remove redundant edges and basic blocks, and create new ones if necessary. Index: passes.c =================================================================== --- passes.c (Revision 146817) +++ passes.c (Arbeitskopie) @@ -709,13 +709,9 @@ init_optimization_passes (void) NEXT_PASS (pass_cleanup_eh); NEXT_PASS (pass_nrv); NEXT_PASS (pass_mudflap_2); - NEXT_PASS (pass_mark_used_blocks); NEXT_PASS (pass_cleanup_cfg_post_optimizing); NEXT_PASS (pass_warn_function_noreturn); -/* NEXT_PASS (pass_del_ssa); - NEXT_PASS (pass_free_datastructures); - NEXT_PASS (pass_free_cfg_annotations);*/ NEXT_PASS (pass_expand); NEXT_PASS (pass_rest_of_compilation);