RFR: 8295486: Inconsistent constant field values observed during compilation [v6]
Tobias Hartmann
thartmann at openjdk.org
Wed Jan 25 07:32:34 UTC 2023
On Tue, 24 Jan 2023 21:20:34 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Tobias Hartmann has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8295486
>> - Check cache before state transition
>> - Fix to verification code
>> - NULL -> nullptr
>> - Moved caching logic to ciObject
>> - Caching of stable values
>> - Updated copyright
>> - 8295486: Inconsistent constant field values observed during compilation
>
> src/hotspot/share/ci/ciObject.cpp line 194:
>
>> 192: // Add a constant value to the cache.
>> 193: void ciObject::add_to_constant_value_cache(int off, ciConstant val) {
>> 194: assert(val.is_valid(), "value must be valid");
>
> Maybe add an assert to ensure the list doesn't contain the value?
>
> assert(check_constant_value_cache(off, val.basic_type()).is_valid() == false, "duplicate");
Done.
> src/hotspot/share/ci/ciObject.cpp line 197:
>
>> 195: if (_constant_values == nullptr) {
>> 196: Arena* arena = CURRENT_ENV->arena();
>> 197: _constant_values = new (arena) GrowableArray<ConstantValue>(arena, 0, 0, ConstantValue());
>
> Considering an element is added right away, it makes sense to increase initial capacity (to 1, at least).
Makes sense. Done.
-------------
PR: https://git.openjdk.org/jdk/pull/11861
More information about the hotspot-compiler-dev
mailing list