RFR: 8302780: Add support for vectorized arraycopy GC barriers [v6]

Andrew Haley aph at openjdk.org
Thu Mar 2 10:01:21 UTC 2023


On Wed, 1 Mar 2023 09:29:14 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 812:
>> 
>>> 810:       bs_asm->copy_load_at(_masm, decorators, type, 32,
>>> 811:                            v2, v3, Address(__ pre(s, 8 * unit)),
>>> 812:                            gct1, gct2, gcvt1);
>> 
>> All this extreme cut-and-paste manual unrolling is very hard to read, maintain, and review.
>> I wasn't going to say anything, because it's Erik, and what do I know! But I must push back here, this is too much.
>> Please consider these style changes.
>
> I updated the PR with a helper stack object encapsulating the choice of GC temp registers, types, decorators, etc, so that each line removes all the noise and becomes more readable. Do you like it? If yes, do you also want your proposed loop constructions in the new more compact form? I'm okay either way.

The more compact form is a _huge_ improvement. I believe that using loops rather than hand-unrolling the code would make it even better!

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

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


More information about the hotspot-dev mailing list