RFR: 8282194: C1: Missing side effects of dynamic constant linkage

Vladimir Kozlov kvn at openjdk.java.net
Tue Feb 22 19:13:54 UTC 2022


On Mon, 21 Feb 2022 13:20:08 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> After [JDK-8280473](https://bugs.openjdk.java.net/browse/JDK-8280473), C1 handles unresolved dynamic constants by performing
> constant resolution at runtime and then putting the constant value into the
> generated code by patching it. But it treats the not-yet-resolved constant as a
> pure value, dynamic constants are produced by user-defined bootstrap methods
> and there are no guarantees that they don't have any side effects.
> 
> Proposed fix conservatively kills the whole memory state after any unresolved
> dynamic constant.
> 
> Testing:
> - [x] jck:vm/constantpool/resolveDynamicConstant w/ -Xcomp
> - [x] hs-tier1 - hs-tier4

Good.

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

Marked as reviewed by kvn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7557


More information about the hotspot-compiler-dev mailing list