This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [tree-ssa] Gimplifying Java
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Jeff Sturm <jsturm at one-point 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: 13 Jun 2003 17:28:14 -0400
- Subject: Re: [tree-ssa] Gimplifying Java
- Organization: Red Hat Canada
- References: <Pine.LNX.4.44.0306131712140.6334-100000@ops2.one-point.com>
On Fri, 2003-06-13 at 17:17, Jeff Sturm wrote:
> On Fri, 13 Jun 2003, Andrew Haley wrote:
> > Is this one right? I thought the copy-in and out of the temporary was
> > necessary on some architectures.
>
> I expected these to be equivalent. There's still a temporary involved.
> The trouble with the old code is that a VAR_DECL all by itself doesn't
> appear to be a valid GIMPLE expression and causes some odd looking tree
> dumps.
>
Does the java gimplifier generate a GIMPLE statement that is nothing but
a VAR_DECL? That is not good (and we should probably have a check to
ICE early)
The optimizers cannot handle the duality because there is a field in the
tree node (tree.common.ann) that is used to hold annotations. We have
separate annotations for variables and statements, but they both use the
same field.
So, if the gimplification pass ever generates something like:
foo()
{
var;
}
The optimizers will get confused in interesting ways.
Diego.