RFR: 8295486: Inconsistent constant field values observed during compilation [v2]
Vladimir Ivanov
vlivanov at openjdk.org
Thu Jan 12 22:26:14 UTC 2023
On Wed, 11 Jan 2023 06:28:52 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> But wouldn't that require duplication of the ciEnv::check_stable_value logic and having a GrowableArray per ciObject instance?
Are you primarily concerned about footprint? The field can be lazily initialized to reduce possible effects.
`check_stable_value` still can be shared (e.g., placed on `ciObject`).
> Regarding covering more cases like static final fields: I intentionally omitted them because I don't think it's possible to delay constant folding of such loads until CCP
If you want to limit the current patch to stable case only, that's fine with me. But keep in mind that we still want to uniformly treat all cases where field/array element values are considered constant. Concurrent field modifications introduce non-determinism into compilation process which we would like to avoid. So, even if we don't cover final fields right away, let's prepare for a future enhancement which will cover that. In that respect, stable references in names are misleading.
-------------
PR: https://git.openjdk.org/jdk/pull/11861
More information about the hotspot-compiler-dev
mailing list