This is the mail archive of the gcc-patches@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]

Re: -fdump-rtl-expand


On Fri, Apr 25, 2008 at 7:08 PM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
>  when I was writting cfgexpand, I definitly thought of it as a tree pass
>  but it ended up in RTL dumps that I mistakely changed with the
>  reorganization of passmanager.
>
>  This patch fixes it by turning cfgexpand to RTL pass and moving the
>  check that pass type matches the IL after the pass is executed.
>
>  Bootstrapping/regtestig i686-linux, OK?

Ok.

Thnaks,
Richard.

>         PR testsuite/35843
>         * cfgexpand.c (pass_expand): Turn into RTL pass.
>         * passes.c (execute_one_pass): Do pass typechecking after execution.
>         * tree-pass.h (pass_expand): Turn into RTL pass.
>  Index: passes.c
>  ===================================================================
>  --- passes.c    (revision 134669)
>  +++ passes.c    (working copy)
>  @@ -1074,11 +1074,7 @@ execute_one_pass (struct opt_pass *pass)
>    if (pass->type == SIMPLE_IPA_PASS)
>      gcc_assert (!cfun && !current_function_decl);
>    else
>  -    {
>  -      gcc_assert (cfun && current_function_decl);
>  -      gcc_assert (!(cfun->curr_properties & PROP_trees)
>  -                 || pass->type != RTL_PASS);
>  -    }
>  +    gcc_assert (cfun && current_function_decl);
>
>    current_pass = pass;
>    /* See if we're supposed to run this pass.  */
>  @@ -1174,6 +1170,10 @@ execute_one_pass (struct opt_pass *pass)
>        dump_file = NULL;
>      }
>
>  +  if (pass->type != SIMPLE_IPA_PASS)
>  +    gcc_assert (!(cfun->curr_properties & PROP_trees)
>  +               || pass->type != RTL_PASS);
>  +
>    current_pass = NULL;
>    /* Reset in_gimple_form to not break non-unit-at-a-time mode.  */
>    in_gimple_form = false;
>  Index: cfgexpand.c
>  ===================================================================
>  --- cfgexpand.c (revision 134669)
>  +++ cfgexpand.c (working copy)
>  @@ -1982,10 +1982,10 @@ tree_expand_cfg (void)
>    return 0;
>   }
>
>  -struct gimple_opt_pass pass_expand =
>  +struct rtl_opt_pass pass_expand =
>   {
>   {
>  -  GIMPLE_PASS,
>  +  RTL_PASS,
>    "expand",                            /* name */
>    NULL,                                 /* gate */
>    tree_expand_cfg,                     /* execute */
>  Index: tree-pass.h
>  ===================================================================
>  --- tree-pass.h (revision 134669)
>  +++ tree-pass.h (working copy)
>  @@ -335,7 +335,6 @@ extern struct gimple_opt_pass pass_simpl
>   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_expand;
>   extern struct gimple_opt_pass pass_rest_of_compilation;
>   extern struct gimple_opt_pass pass_sink_code;
>   extern struct gimple_opt_pass pass_fre;
>  @@ -373,6 +372,7 @@ extern struct gimple_opt_pass pass_free_
>   extern struct gimple_opt_pass pass_init_datastructures;
>   extern struct gimple_opt_pass pass_fixup_cfg;
>
>  +extern struct rtl_opt_pass pass_expand;
>   extern struct rtl_opt_pass pass_init_function;
>   extern struct rtl_opt_pass pass_jump;
>   extern struct rtl_opt_pass pass_rtl_eh;
>


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