RFR: 8319781: RISC-V: Refactor UseRVV related checks

Hamlin Li mli at openjdk.org
Mon Nov 13 15:17:00 UTC 2023


On Mon, 13 Nov 2023 14:47:04 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hi,
>> Can you review the patch to refactor the code related UseRVV checks?
>> Thanks!
>> 
>> There are some code (flag setting/checking) depending on UseRVV's value, these code should be refactored, especially after the change of https://bugs.openjdk.org/browse/JDK-8319408:
>> 1. some code needs to get the final UseRVV's value rather than the initial value, e.g. ChaCha20 intrinsic.
>> 2. refactored to be more readable.
>> 3. also add note to make sure the future code get the final UseRVV value instead of inital value.
>
> 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;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16580#discussion_r1391252954


More information about the hotspot-dev mailing list