This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rtl_loop_init vs try_redirect_by_replacing_jump vs simple jumps
- From: "Steven Bosscher" <stevenb dot gcc at gmail dot com>
- To: "DJ Delorie" <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 May 2006 08:26:11 +0200
- Subject: Re: rtl_loop_init vs try_redirect_by_replacing_jump vs simple jumps
- References: <200605230351.k4N3pKUY026394@greed.delorie.com>
On 5/23/06, DJ Delorie <dj@redhat.com> wrote:
What seems to happen is, we delete the simple jump even if we can't
fallthru, and thus the blocks get rearranged in an incorrect order.
Is there a bug here, or am I misunderstanding how this code works?
You're misunderstanding how this code works. In cfglayout mode, there
is no "order" in the basic blocks such that
BLOCK_FOR_INSN(NEXT_INSN(BB_END(BB)) ) == BB->next_bb. This means that
you can fall through to other blocks than next_bb.
cfg_layout_finalize should fix this up where necessary when you go
back into cfgrtl mode.
Perhaps http://gcc.gnu.org/wiki/cfglayout%20mode can help explain
this a bit more.
Gr.
Steven