RFR: 8295486: Inconsistent constant field values observed during compilation [v4]

Tobias Hartmann thartmann at openjdk.org
Fri Jan 20 08:09:56 UTC 2023


On Thu, 19 Jan 2023 18:40:07 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   NULL -> nullptr
>
> src/hotspot/share/ci/ciArray.cpp line 99:
> 
>> 97:   GUARDED_VM_ENTRY(
>> 98:     ciConstant value = element_value_impl(elembt, get_arrayOop(), index);
>> 99:     return check_constant_value_cache(index, value);
> 
> If you check the cache first, you don't need to be in VM when doing that.
> 
> (As it is now, it doesn't help static/instance fields, but it can be improved. Something for a follow-up cleanup.)

Right, updated.

> src/hotspot/share/ci/ciObject.hpp line 65:
> 
>> 63:   class ConstantValue {
>> 64:     private:
>> 65:       const ciObject* _obj;
> 
> Since `_constant_values` is instance-specific, there's no need in `_obj` anymore, right?

Good catch, removed.

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

PR: https://git.openjdk.org/jdk/pull/11861


More information about the hotspot-compiler-dev mailing list