RFR: 8295486: Inconsistent constant field values observed during compilation
Vladimir Ivanov
vlivanov at openjdk.org
Fri Jan 6 19:17:51 UTC 2023
On Fri, 6 Jan 2023 18:53:56 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> Stable field value should be added to method dependencies such that compilation becomes invalid if stable value changes later on.
It's too much for @Stable. It's allowed to observe stale values when concurrent modifications happen. It would require dependency checking on every `@Stable` field or array element update which is infeasible for arrays (all array stores have to be intercepted).
On the other hand, caching a single value which is used across the whole compilation has only performance impact (whether non-null value is observed or not).
-------------
PR: https://git.openjdk.org/jdk/pull/11861
More information about the hotspot-compiler-dev
mailing list