RFR: 8323582: C2 SuperWord AlignVector: misaligned vector memory access with unaligned native memory

Vladimir Kozlov kvn at openjdk.org
Wed Feb 19 16:18:57 UTC 2025


On Wed, 19 Feb 2025 07:17:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> > Can we profile alignment in Interpreter (and C1)?
> 
> It would be nice if we could profile alignment or aliasing. Maybe that is possible. But I suppose there are always cases where profiling is not available (Xcomp ?), and we should have reasonable defaults there. We could investigate profiling in a second step, to improve things if we think that is worth it. Profiling these things would also be additional complexity - I'm not convinced yet it is worth it.
> 
> What do you think?

You should not worry about `-Xcomp` it is testing flag - we can use some default there.
I am fine if you think profiling will not bring us much benefits. Note, I am not asking create counters - just a bit to indicate if we had unaligned access to native memory in a method. In such case we may skip predicate and generate multi versions loop during compilation. On other hand, we may have unaligned access only during startup and not later when we compile method. Anyway, it does not affect these changes.

I will look on changes more later.

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

PR Comment: https://git.openjdk.org/jdk/pull/22016#issuecomment-2669115673


More information about the hotspot-dev mailing list