This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Your change to alloc-pool.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Arnaud Charlet <charlet at ACT-Europe dot FR>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Jan 2004 18:35:38 -0700 (MST)
- Subject: Re: Your change to alloc-pool.c
On Wed, 28 Jan 2004, Jan Hubicka wrote:
> > > It's indeed clearly a latent bug.
> >
> > I am testing the attached patch.
> > It solve at least the C testcase you have me.
Could you provide a bit more explanation of why you believe your
patch is the correct fix, and that this isn't actually a bug in
the CFG code, i.e. redirect_edge_and_branch_force?
I'm particularly confused how between line 4809 of gcse.c, that we
explicitly ignore abnormal edges, "e->flags & EDGE_COMPLEX", and
line 4890, where we call "insert_insn_on_edge" with e, we manage
to trip the assert "(e->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (e)".
Can redirecting an edge change it from normal to abnormal?
Where are we trying to unify/combine two edges when either edge
has instructions on.
> + edge e2;
> + for (e2 = e->src->succ; e2; e2 = e2->succ_next)
> + if (e2->dest == dest)
> + break;
> + if (e2)
> + dest = NULL;
Given that you're disabling jump bypassing opportunities, its only
fitting that you rewrite this as:
edge e2;
for (e2 = e->src->succ; e2; e2 = e2->succ_next)
if (e2->dest == dest)
{
dest = NULL;
break;
}
This has less control flow, and doesn't require jump bypassing to
clean it up later :>
Roger
--