This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Patch: Update jacks.xfail for the tree-ssa merge


On Sun, 16 May 2004, Ranjit Mathew wrote:
> All of the failures:
>
>   16.1.7-simple-definite-unassignment-pass-1
>   16.2.10-definite-unassign-pass-3
>   16.2.11-definite-unassign-pass-3
>   16.2.9-definite-unassign-pass-3
>   non-jls-jsr41.2-nesting-1
>
> arise because we now no longer optimise away an if-else statement
> if the condition is constant. This change was done as a part of the
> original gimplification of Java (see patch_if_else_statement):
>
>   http://gcc.gnu.org/ml/java-patches/2003-q2/msg00409.html

Wow... good catch!  (Sheepishly, I don't remember whether I ran jacks
against the original gimplifier patch or not.  Probably not.)

This part of the message gives a clue why I must have deleted that
optimization from the parser:

>Most of the conversion is handled in java_simplify_expr, however there are
>other changes due to certain trees that are not acceptable to gimplify
>even though they are accepted by the RTL expanders.  For example,
>LOOP_EXPR nodes with trailing empty statements cause an incorrect CFG to
>be constructed, breaking copy/constant propogation.

Besides, I figured it was bogus that the parser tries to optimize
these cases at all, instead of leaving the job up to DCE.  I clearly
wasn't thinking about definite assignment at the time :-(

> So we can't simply throw away the dead portion of an if-else
> statement with a constant condition.

Perhaps we could ignore the dead branch somwhere within
check_for_initialization?

The 5 new failures should get fixed somehow.  I'm not comfortable with
trading new passes for regressions, whatever the numbers are.

Jeff


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