On Tue, 9 Apr 2024 23:45:39 GMT, Scott Gibbons <sgibb...@openjdk.org> wrote:

> Is there any way to disable some of the optimizations C2 will attempt on the 
> IR? We need to maintain atomicity, so vectorization shouldn't occur, for 
> instance. This seems like a rat-hole that would need constant maintenance as 
> C2 optimizations get better.

Sorry, I do not know that (I'm not a C2 engineer :-) ). One small observation: 
how important is atomicity in the "full off-heap case" ? E.g. if a `setMemory` 
is occurring at a location that is provably off-heap (and we should have ways 
to detect that, we do that also for other unsafe memory access routines), then 
perhaps the atomicity requirement can go (as I suppose that requirement is 
there for the Java Memory Model) ?

So, perhaps, while we might not be able to fully optimize for on-heap access, 
we might be able to do so for off-heap access (which is an important case for 
FFM).

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

PR Comment: https://git.openjdk.org/jdk/pull/18555#issuecomment-2047288498

Reply via email to