RFR: 8318217: RISC-V: C2 VectorizedHashCode [v2]

Hamlin Li mli at openjdk.org
Fri Nov 24 18:59:05 UTC 2023


On Fri, 24 Nov 2023 18:41:03 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> I guess it might be a performance consideration (maybe saving some register-register moves?). I see the x86_64 counterpart also specifies certain regsiters [1]. You might want give it try on x86_64 to find out how it may make a difference on the JIT code.
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_64.ad#L11225
>
> Hey, I saw you already change the code in this patch to not use the specific registers, do you still face the JVM starting issue?

I think the reason might be: with specific register, you can add effect as `USE_KILL ary, USE_KILL cnt`, but without specific register, currently you have to way to do so.
But, in current patch, it does modify the ary and cnt in the intrinsic, so I wonder if the current (lastest) patch is safe enough in all situation.

It maybe be helpful to add 2 new register when matching the instrinsic in ad file, and I guess the register allocator will merge different use of temp register together?
But I still think it's not necessary to specify the register when matching arrays_hashcode in ad file.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16629#discussion_r1404593130


More information about the hotspot-dev mailing list