This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR42871, recursion in phi_translate
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Daniel Berlin <dberlin at dberlin dot org>
- Date: Wed, 27 Jan 2010 18:27:47 +0100
- Subject: Re: [PATCH] Fix PR42871, recursion in phi_translate
- References: <alpine.LNX.2.00.1001271815570.12128@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 27, 2010 at 06:19:58PM +0100, Richard Guenther wrote:
> --- 1834,1853 ----
> {
> pre_expr translated;
> translated = phi_translate (expr, set, NULL, pred, phiblock);
> + if (!translated)
> + continue;
>
> /* Don't add empty translations to the cache */
> if (translated)
Shouldn't this if (translated) be dropped (and the comment moved above
if (!translated) continue)?
> phi_trans_add (expr, translated, pred);
>
> ! /* We might end up with multiple expressions from SET being
> ! translated to the same value. In this case we do not want
> ! to retain the NARY or REFERENCE expression but prefer a NAME
> ! which would be the leader. */
> ! if (translated->kind == NAME)
> ! bitmap_value_replace_in_set (dest, translated);
> ! else
> bitmap_value_insert_into_set (dest, translated);
> }
> VEC_free (pre_expr, heap, exprs);
Jakub