This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Gimplifying Java
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Andrew Haley <aph at redhat dot com>, <java-patches at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Jul 2003 00:06:36 -0400 (EDT)
- Subject: Re: [tree-ssa] Gimplifying Java
On 13 Jun 2003, Diego Novillo wrote:
> > t = {int <tmp>; <tmp> = p->a; <tmp>}
>
> In C we just introduce another temporary:
>
> {
> int retval.1;
> int t;
>
> {
> int tmp;
>
> tmp = p->a;
> retval.1 = tmp
> };
> t = retval.1
> }
>
> Would that work for you?
That's what I ended up doing too, although I suspect it can go away... we
were using it to copy the RHS of a MODIFY_EXPR that can trap. Jeff Law's
patch to gimplify_modify_expr is a more general fix to that problem:
* gimplify.c (gimplify_modify_expr): If the RHS of an MODIFY_EXPR
might throw, then make sure its result goes into a temporary.
Jeff