This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/6] merge register_dump_files_1 into register_dump_files
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: tsaunders at mozilla dot com
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 17 Apr 2014 10:53:32 +0200
- Subject: Re: [PATCH 2/6] merge register_dump_files_1 into register_dump_files
- Authentication-results: sourceware.org; auth=none
- References: <1397723842-29147-1-git-send-email-tsaunders at mozilla dot com> <1397723842-29147-2-git-send-email-tsaunders at mozilla dot com>
On Thu, Apr 17, 2014 at 10:37 AM, <tsaunders@mozilla.com> wrote:
> From: Trevor Saunders <tsaunders@mozilla.com>
>
> Hi,
>
> simplification allowed by previous patch.
>
> bootstrap + regtest passed on x86_64-unknown-linux-gnu, ok?
Ok.
Thanks,
Richard.
> Trev
>
> 2014-03-19 Trevor Saunders <tsaunders@mozilla.com>
>
> * pass_manager.h (pass_manager::register_dump_files_1): Remove declaration.
> * passes.c (pass_manager::register_dump_files_1): Merge into
> (pass_manager::register_dump_files): this, and remove its handling of
> properties since the pass always has the properties anyway.
> (pass_manager::pass_manager): Adjust.
>
>
> diff --git a/gcc/pass_manager.h b/gcc/pass_manager.h
> index 8309567..9f4d67b 100644
> --- a/gcc/pass_manager.h
> +++ b/gcc/pass_manager.h
> @@ -91,8 +91,7 @@ public:
>
> private:
> void set_pass_for_id (int id, opt_pass *pass);
> - void register_dump_files_1 (opt_pass *pass);
> - void register_dump_files (opt_pass *pass, int properties);
> + void register_dump_files (opt_pass *pass);
>
> private:
> context *m_ctxt;
> diff --git a/gcc/passes.c b/gcc/passes.c
> index 3f9590a..7508771 100644
> --- a/gcc/passes.c
> +++ b/gcc/passes.c
> @@ -706,11 +706,10 @@ pass_manager::register_one_dump_file (opt_pass *pass)
> free (CONST_CAST (char *, full_name));
> }
>
> -/* Recursive worker function for register_dump_files. */
> +/* Register the dump files for the pass_manager starting at PASS. */
>
> void
> -pass_manager::
> -register_dump_files_1 (opt_pass *pass)
> +pass_manager::register_dump_files (opt_pass *pass)
> {
> do
> {
> @@ -718,25 +717,13 @@ register_dump_files_1 (opt_pass *pass)
> register_one_dump_file (pass);
>
> if (pass->sub)
> - register_dump_files_1 (pass->sub);
> + register_dump_files (pass->sub);
>
> pass = pass->next;
> }
> while (pass);
> }
>
> -/* Register the dump files for the pass_manager starting at PASS.
> - PROPERTIES reflects the properties that are guaranteed to be available at
> - the beginning of the pipeline. */
> -
> -void
> -pass_manager::
> -register_dump_files (opt_pass *pass,int properties)
> -{
> - pass->properties_required |= properties;
> - register_dump_files_1 (pass);
> -}
> -
> struct pass_registry
> {
> const char* unique_name;
> @@ -1536,19 +1523,11 @@ pass_manager::pass_manager (context *ctxt)
> #undef TERMINATE_PASS_LIST
>
> /* Register the passes with the tree dump code. */
> - register_dump_files (all_lowering_passes, PROP_gimple_any);
> - register_dump_files (all_small_ipa_passes,
> - PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
> - | PROP_cfg);
> - register_dump_files (all_regular_ipa_passes,
> - PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
> - | PROP_cfg);
> - register_dump_files (all_late_ipa_passes,
> - PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
> - | PROP_cfg);
> - register_dump_files (all_passes,
> - PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
> - | PROP_cfg);
> + register_dump_files (all_lowering_passes);
> + register_dump_files (all_small_ipa_passes);
> + register_dump_files (all_regular_ipa_passes);
> + register_dump_files (all_late_ipa_passes);
> + register_dump_files (all_passes);
> }
>
> /* If we are in IPA mode (i.e., current_function_decl is NULL), call
> --
> 1.9.2
>