This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Remove useless sets/clears of EDGE_CAN_FALLTHRU
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jul 2012 10:53:45 +0200
- Subject: Re: [patch] Remove useless sets/clears of EDGE_CAN_FALLTHRU
- References: <CABu31nN0TzsbGh7Ygr7QhDsgx9OvmOn0_Ot6TwEN-m5xNEN7DQ@mail.gmail.com>
On Sat, Jul 14, 2012 at 11:40 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> EDGE_CAN_FALLTHRU is internal to bb-reorder.c,
> set_edge_can_fallthru_flag() clears it on all edges and computes it
> fresh for bb-reorder.
>
> The test in rtl_verify_flow_info_1 has to stay because bb-reorder
> doesn't clean up the flag after it's done.
>
> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK?
Ok.
Maybe we should rename EDGE_CAN_FALLTHRU to EDGE_PLF_1
and have a #define in bb-reorder.c then? Other passes might use
it for their pass-local handling then and would not be content to set/unset
it.
Thanks,
Richard.
> Ciao!
> Steven
>
> * haifa-sched.c (init_before_recovery): Do not set EDGE_CAN_FALLTHRU.
> * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
>
> Index: haifa-sched.c
> ===================================================================
> --- haifa-sched.c (revision 189478)
> +++ haifa-sched.c (working copy)
> @@ -7193,8 +7193,7 @@ init_before_recovery (basic_block *before_recovery
>
> redirect_edge_succ (e, single);
> make_single_succ_edge (single, empty, 0);
> - make_single_succ_edge (empty, EXIT_BLOCK_PTR,
> - EDGE_FALLTHRU | EDGE_CAN_FALLTHRU);
> + make_single_succ_edge (empty, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
>
> label = block_label (empty);
> x = emit_jump_insn_after (gen_jump (label), BB_END (single));
> Index: cfgrtl.c
> ===================================================================
> --- cfgrtl.c (revision 189478)
> +++ cfgrtl.c (working copy)
> @@ -1365,8 +1365,8 @@ force_nonfallthru_and_redirect (edge e, basic_bloc
> one and create separate abnormal edge to original destination.
> This allows bb-reorder to make such edge non-fallthru. */
> gcc_assert (e->dest == target);
> - abnormal_edge_flags = e->flags & ~(EDGE_FALLTHRU | EDGE_CAN_FALLTHRU);
> - e->flags &= EDGE_FALLTHRU | EDGE_CAN_FALLTHRU;
> + abnormal_edge_flags = e->flags & ~EDGE_FALLTHRU;
> + e->flags &= EDGE_FALLTHRU;
> }
> else
> {