RFR: 8282194: C1: Missing side effects of dynamic constant linkage
Vladimir Ivanov
vlivanov at openjdk.java.net
Mon Feb 21 13:35:20 UTC 2022
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
-------------
Commit messages:
- 8282194: C1: Missing side effects of dynamic constant linkage
Changes: https://git.openjdk.java.net/jdk/pull/7557/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7557&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8282194
Stats: 35 lines in 5 files changed: 30 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/7557.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7557/head:pull/7557
PR: https://git.openjdk.java.net/jdk/pull/7557
More information about the hotspot-compiler-dev
mailing list