Request for reviews (XS): 6866651: Regression: simple int sum crashes jvm (build 1.6.0_14-b08 and 1.7.0-ea-b59)
changpeng fang - Sun Microsystems - Santa Clara United States
Changpeng.Fang at Sun.COM
Fri Aug 14 15:59:21 PDT 2009
On 08/14/09 15:34, Tom Rodriguez wrote:
> Why are you including the first part in this fix? I don't see the
> motivation for that change.
>
The motivation is to skip unnecessary optimizations. During work on
this bug, I found cases like
below. If we don't replace add with constant earlier, the ideal
optimization will keep doing
reassociation of the operands.
const singleton
\ /
\ /
add1 (singleton)
\ const
\ /
\ /
\ /
add (singleton)
Anyway, doing this should give us small benefit ( I could not see any
side effect).
Thanks,
Changpeng
> tom
>
> On Aug 14, 2009, at 2:50 PM, changpeng fang - Sun Microsystems - Santa
> Clara United States wrote:
>
>> http://cr.openjdk.java.net/~cfang/6866651/webrev.00/
>>
>> Fixed 6866651: Regression: simple int sum crashes jvm (build
>> 1.6.0_14-b08 and 1.7.0-ea-b59)
>>
>> Problem:
>> set_req_X will do dead code elimination if the original input has no
>> other use. However, it is possible to
>> have the current node (this) removed if a dead loop exists. So,
>> dead code elimination in set_req_X is not
>> safe, and may cause undesired consequences (like the segfault in
>> 6866651)
>>
>> Solution:
>> Instead of doing dead code elimination immediately in set_req_X, we
>> put the dead node (original input) into
>> the worklist, and the dead node will eventually be eliminated when it
>> is its turn to be processed.
>>
>> In addition, before ideal transformations, we replace a node with a
>> constant if we know it computes a constant
>> to skip unneeded optimizations on this node. Tests: JPRT,
>> CompileTheWorld, Test case in bug report (Test.java in webrev)
>>
>> Thanks,
>>
>> Changpeng
>
More information about the hotspot-compiler-dev
mailing list