This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for PR42337
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Daniel Berlin <dannyb at google dot com>
- Date: Wed, 9 Dec 2009 12:08:00 +0100
- Subject: Re: Fix for PR42337
- References: <522e93240912081533m2011c209t4f3689458db9bcd6@mail.gmail.com>
On Wed, Dec 9, 2009 at 12:33 AM, Xinliang David Li <davidxl@google.com> wrote:
> Hi, Please see attached patch for fixing PR42337.
>
> Testing:
> bootstrapped on x86_64/linux, regression test
>
> There is ?no observed (xalancbmk and gcc) compile time overhead.
The patch doesn't make sense to me.
From the description in the bugreport I understand that the problem is
we mark expressions as seen even though we do not translate them
(but return NULL later).
Your patch instead simply does not update seen at all when recursively
invoking from NARY_EXPRs (but not REFERENCEs?!). So, why not
pass NULL for seen here instead of copying the old bitmap _for each operand_.
Certainly bad engineered.
Now I see:
/* Prevent cycles when we have recursively dependent leaders. This
can only happen when phi translating the maximal set. */
if (seen)
{
unsigned int expr_id = get_expression_id (expr);
if (bitmap_bit_p (seen, expr_id))
return NULL;
bitmap_set_bit (seen, expr_id);
}
we do no longer translate the maximal set, so we can simply remove
this cycle detection at all?
So, not ok.
Thanks,
Richard.
> Thanks,
>
> David
>