RFR(S): 8252292: 8240795 may cause anti-dependence to be missed
Igor Ignatyev
igor.ignatyev at oracle.com
Tue Aug 25 14:25:26 UTC 2020
> On Aug 25, 2020, at 6:49 AM, Tobias Hartmann <tobias.hartmann at oracle.com> wrote:
>
> Hi Roland,
>
> Good catch, the fix looks reasonable to me.
>
> I think the test needs a @requires vm.gc == "Parallel" | vm.gc == "null" to not fail due to
> conflicting GC options if another GC is set.
Hi Roland,
'@requires vm.gc.Parallel' should be used to limit execution of the test to configurations where ParallelGC is available and selectable (meaning no GC has been explicitly specified or explicitly specified GC is Parallel).
-- Igor
>
> Best regards,
> Tobias
>
> On 25.08.20 10:23, Roland Westrelin wrote:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8252292
>> http://cr.openjdk.java.net/~roland/8252292/webrev.00/
>>
>> In 8240795, I modified alias analysis so non escaping allocations don't
>> alias with bottom memory. While browsing that code last week, I noticed
>> that that change didn't seem quite right and may cause some
>> anti-dependences to be missed. I could indeed write a test case that
>> fails with an incorrect execution.
>>
>> In the test case: the dst[9] load after the ArrayCopy is transformed
>> into a src[9] load before the ArrayCopy. Anti dependence analysis find
>> src[9] shares the memory of the ArrayCopy but because of the way I
>> tweaked the code with 8240795, anti-dependence analysis finds the src[9]
>> and ArrayCopy don't alias so src[9] can sink out of the loop which is
>> wrong because of the src[9] store. Anti-dependence analysis in that case
>> would need to look at the memory uses of ArrayCopy too.
>>
>> Roland.
>>
More information about the hotspot-compiler-dev
mailing list