Integrated: 8327426: RISC-V: Move alignment shim into initialize_header() in C1_MacroAssembler::allocate_array
Gui Cao
gcao at openjdk.org
Fri Mar 8 03:00:59 UTC 2024
On Wed, 6 Mar 2024 04:06:47 GMT, Gui Cao <gcao at openjdk.org> wrote:
> Hi, I noticed that RISC-V missed this change from #11044 [1]:
>
> `I know @albertnetymk already touched on this but some thoughts on the unclear boundaries between the header and the data. My feeling is that the most pragmatic solution would be to have the header initialization always initialize up to the word aligned (up) header_size_in_bytes. (Similarly to how it is done for the instanceOop where the klass gap gets initialized with the header, even if it may be data.) And have the body initialization do the rest (word aligned to word aligned clear).`
>
> `This seems preferable than adding these extra alignment shims in-between the header and body/payload/data initialization. (I also tried moving the alignment fix into the body initialization, but it seems a little bit messier in the implementation.)`
>
>
> After this patch, it will be more consistent with other CPU platforms like X86 and ARM64.
>
> [1] https://github.com/openjdk/jdk/pull/11044#pullrequestreview-1894323275
>
> ### Tests
>
> - [x] Run tier1-3 tests on SiFive unmatched (release)
This pull request has now been integrated.
Changeset: de428daf
Author: Gui Cao <gcao at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/de428daf9adef5afe7347319f7a6f6732e9b6c4b
Stats: 16 lines in 1 file changed: 6 ins; 7 del; 3 mod
8327426: RISC-V: Move alignment shim into initialize_header() in C1_MacroAssembler::allocate_array
Reviewed-by: fyang
-------------
PR: https://git.openjdk.org/jdk/pull/18131
More information about the hotspot-compiler-dev
mailing list