> 2013-11-18  Teresa Johnson  <tejohn...@google.com>
> 
>         * gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
>         try to go into cfglayout after bb reordering.
>         * gcc/passes.def: Move compgotos before bb reordering
>         since it goes into cfglayout.

This seems resonable to me, but I can't approve it.
> 
> Index: gcc/cfgrtl.c
> ===================================================================
> --- gcc/cfgrtl.c        (revision 204977)
> +++ gcc/cfgrtl.c        (working copy)
> @@ -4204,6 +4204,8 @@ cfg_layout_initialize (unsigned int flags)
>    rtx x;
>    basic_block bb;
> 
> +  gcc_assert (!crtl->bb_reorder_complete);

I would definitely add a comment explaining why we don't want to run after 
bb_reorder.

Honza
> +
>    initialize_original_copy_tables ();
> 
>    cfg_layout_rtl_register_cfg_hooks ();
> Index: gcc/passes.def
> ===================================================================
> --- gcc/passes.def      (revision 204977)
> +++ gcc/passes.def      (working copy)
> @@ -387,6 +387,7 @@ along with GCC; see the file COPYING3.  If not see
>           NEXT_PASS (pass_regrename);
>           NEXT_PASS (pass_cprop_hardreg);
>           NEXT_PASS (pass_fast_rtl_dce);
> +         NEXT_PASS (pass_duplicate_computed_gotos);
>           NEXT_PASS (pass_reorder_blocks);
>           NEXT_PASS (pass_branch_target_load_optimize2);
>           NEXT_PASS (pass_leaf_regs);
> @@ -398,7 +399,6 @@ along with GCC; see the file COPYING3.  If not see
>               NEXT_PASS (pass_stack_regs_run);
>           POP_INSERT_PASSES ()
>           NEXT_PASS (pass_compute_alignments);
> -         NEXT_PASS (pass_duplicate_computed_gotos);
>           NEXT_PASS (pass_variable_tracking);
>           NEXT_PASS (pass_free_cfg);
>           NEXT_PASS (pass_machine_reorg);
> 
> 
> >
> > Ciao!
> > Steven
> 
> 
> 
> -- 
> Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413

Reply via email to