RFR: 8319781: RISC-V: Refactor UseRVV related checks [v2]
Fei Yang
fyang at openjdk.org
Mon Nov 13 15:28:59 UTC 2023
On Mon, 13 Nov 2023 15:14:05 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 295:
>>
>>> 293:
>>> 294: if (!UseRVV) {
>>> 295: FLAG_SET_DEFAULT(SpecialEncodeISOArray, false);
>>
>> Could you please remove this line while you are on it? I don't think we need to reset `SpecialEncodeISOArray` here.
>
> I'm not sure, as there are some code in share/classfile/vmIntrinsics.cpp which depends on SpecialEncodeISOArray's value:
>
> case vmIntrinsics::_encodeISOArray:
> case vmIntrinsics::_encodeAsciiArray:
> case vmIntrinsics::_encodeByteISOArray:
> if (!SpecialEncodeISOArray) return true;
> break;
The reason is that `SpecialEncodeISOArray` is a DIAGNOSTIC option which I think is for debugging / trouble-shooting purpose. The other four ones are `SpecialStringCompareTo`, `SpecialStringIndexOf`, `SpecialStringEquals` and `SpecialArraysEquals`. So this code snippet checking for `SpecialEncodeISOArray` is in function `vmIntrinsics::disabled_by_jvm_flags`. So I think we are safe to have this change. In fact, `SpecialEncodeISOArray` and the others are not checked or modified by other platforms either.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16580#discussion_r1391268606
More information about the hotspot-dev
mailing list