RFR: 8318446: C2: optimize stores into primitive arrays by combining values into larger store [v35]
Emanuel Peter
epeter at openjdk.org
Mon Apr 29 14:26:20 UTC 2024
On Mon, 29 Apr 2024 14:18:46 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> improve RC comment for Vladimir
>
> The case where only stores of constant values are merged wouldn't be difficult to get working also on big endian platforms I think.
> https://github.com/openjdk/jdk/pull/15990 seems to be a use of this optimization and it only makes use of this case, doesn't it?
> Do you have an idea how important the second pattern in the JBS issue is?
>
> a[1] = (byte)v;
> a[2] = (byte)(v >> 8 );
> a[3] = (byte)(v >> 16);
> a[4] = (byte)(v >> 24);
@reinrich feel free to implement and thest the big-endian version. I just wanted to limit the scope of the PR, and I don't really have a big-endian machine to test on.
I'm currently tracking down a follow-up bug or two from this patch, so I have my hands full.
I think one could surely get both, the constant and variable case implemented, in analogy to what I did. But maybe it would require some refactoring, to make sure the two versions live together nicely.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16245#issuecomment-2082890730
More information about the hotspot-compiler-dev
mailing list