[tree-ssa] Gimplifying Java
Jeff Sturm
jsturm@one-point.com
Fri Jun 13 21:28:00 GMT 2003
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.
If you don't think it's right we can try something else. I was meaning to
ask how C statements-as-expressions are expressed in GIMPLE...
Jeff
> *** 12780,12787 ****
> tree assignment
> = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs));
> BLOCK_VARS (block) = tmp;
> - BLOCK_EXPR_BODY (block)
> - = build (COMPOUND_EXPR, TREE_TYPE (new_rhs), assignment, tmp);
> TREE_SIDE_EFFECTS (block) = 1;
> new_rhs = block;
> }
> --- 12794,12800 ----
> tree assignment
> = build (MODIFY_EXPR, TREE_TYPE (new_rhs), tmp, fold (new_rhs));
> BLOCK_VARS (block) = tmp;
> + BLOCK_EXPR_BODY (block) = assignment;
> TREE_SIDE_EFFECTS (block) = 1;
> new_rhs = block;
> }
>
> Andrew.
>
More information about the Gcc-patches
mailing list