RFR: 8305056: Avoid unaligned access in emit_intX methods if not enabled [v3]
Justin King
jcking at openjdk.org
Thu Mar 30 15:03:31 UTC 2023
On Wed, 29 Mar 2023 16:36:17 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:
>> Please review this change which attempts to eliminate unaligned memory stores generated by emit_int16/32/64 methods on some platforms.
>>
>> Primary aim is risc-v platform. But I had to change some code in ppc/arm32/x86 to prevent possible perf degradation.
>
> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>
> Reduce code duplication
`UseUnalignedAccesses` is a flag, no? Doesn't this now require checking to see if its aligned or the flag is true? So for aligned accesses the speed is the same, for unaligned it is now slower as it has to look at the flag first, which is likely somewhere else in memory, forcing cache lines to be flushed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13227#issuecomment-1490459477
More information about the hotspot-compiler-dev
mailing list