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: PR tree-opt/33615 [1/2] Hoisting of throwing expression for -fnon-call-exceptions


On 10/1/07, Richard Sandiford <rsandifo@nildram.co.uk> wrote:
> Index: gcc/tree-ssa-loop-im.c
> ===================================================================
> --- gcc/tree-ssa-loop-im.c      2007-10-01 23:23:16.000000000 +0100
> +++ gcc/tree-ssa-loop-im.c      2007-10-01 23:39:36.000000000 +0100
> @@ -260,7 +260,8 @@ movement_possibility (tree stmt)
>
>    rhs = GIMPLE_STMT_OPERAND (stmt, 1);
>
> -  if (TREE_SIDE_EFFECTS (rhs))
> +  if (TREE_SIDE_EFFECTS (rhs)
> +      || tree_could_throw_p (rhs))
>      return MOVE_IMPOSSIBLE;

Shouldn't TREE_SIDE_EFFECTS be set if the right hand side can throw?
We had the same issue for DCE removing throwable statements for the
same reason.
See http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00419.html

Thanks,
Andrew Pinski


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