RFR(S): 8252292: 8240795 may cause anti-dependence to be missed

Roland Westrelin rwestrel at redhat.com
Tue Aug 25 08:23:19 UTC 2020


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