This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR42871, recursion in phi_translate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]