RFR: 8320649: C2: Optimize scoped values [v18]

Dean Long dlong at openjdk.org
Fri May 24 05:16:11 UTC 2024


On Thu, 23 May 2024 16:36:11 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> 1- replace a ScopedValue.get() by a dominating ScopedValue.get()
> 2- move a ScopedValue.get() out of loop
> 3- streamline code emitted for ScopedValue.get()

I think it might make sense to split 1 and 2, which are independent of the details of get() and put(), from 3.  Then we can consider if there are other optimizations we can do around opaque() get() and put().  For example, why can't we replace a get() with the value from a dominating put()?  Why can't we eliminate both the put() and get() completely, as long as the value can't "escape" or we deoptimize?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16966#issuecomment-2128537981


More information about the hotspot-compiler-dev mailing list