This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples][patch] Don't create GIMPLE_CONDs that trap
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Rafael Espindola" <espindola at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>, "Diego Novillo" <dnovillo at google dot com>
- Date: Fri, 2 May 2008 15:41:20 +0200
- Subject: Re: [tuples][patch] Don't create GIMPLE_CONDs that trap
- References: <38a0d8450805020616k58af1b35pb62ad481f0a4b447@mail.gmail.com>
On Fri, May 2, 2008 at 3:16 PM, Rafael Espindola <espindola@google.com> wrote:
> The attached patch fixes the problem we were having with a BB having
> more than 2 output edges. It includes a fix for the problem Doug's
> observed on tree_could_trap_p.
>
> OK if it bootstraps and passes regression tests.
>
> * tree-eh.c (tree_could_trap_p): Look at the first operand of a
> comparison to find if we have a floating point op.
> * gimplify.c (gimplify_cond_expr): If a comparison traps, put it in a
> GIMPLE_ASSIGN.
I don't know how gimplification is different on the tuples branch, but
shouldn't just adjusting the is_gimple_condexpr predicate to
bool
is_gimple_condexpr (tree t)
{
return (is_gimple_val (t)
|| (COMPARISON_CLASS_P (t)
&& !tree_could_trap_p (t)));
}
be sufficient to fix the problem there (and on the mainline)?
Please also fix this on the mainline (even though I realize that
tree_could_trap_p has diverged in tuples).
Thanks,
Richard.