RFR: 8245955: Shenandoah: Remove LRB/is_redundant optimization

Roman Kennke rkennke at redhat.com
Wed May 27 12:04:05 UTC 2020


Just before expanding LRBs in C2, we check whether or not the LRB is
actually used for anything useful. This optimization is a bit odd, it
doesn't really follow the usual pattern for such things (it should be
done by overwriting Ideal/Identity in the consuming node, and the LRB
would be eliminated when it has no users left).

Also, the optimization doesn't actually seem to have any positive
effect anymore. It used to be significant when we had to deal with
null-checks, but this is gone. The only other thing left is
OptimizeStaticFinals, which is already covered by C2 because it inlines
such fields as constants.

Also, this blocks an improvement to ensure that there's no safepoints
between loads and LRBs because eliminating the LRB can leave from-space 
oops in local variables.

I've run SPECjvm2008 and SPECjbb2015, and have seen no regressions.
Some workloads even seem to benefit (in the range 1-2%) from this
change, and it appears to be a stable, but I have no explanation yet
why this should be the case.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8245955

Webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8245955/webrev.00/

Testing: hotspot_gc_shenandoah, several runs of specjvm and specjbb
without noticable regressions

Roman



More information about the shenandoah-dev mailing list