Open Bug 1442534 Opened 2 years ago Updated 9 months ago

ARM64: Improve code generation for atomics by avoiding fences


(Core :: JavaScript Engine: JIT, enhancement, P3)





(Reporter: lth, Unassigned)



(Whiteboard: [arm64:m3])

Currently we generate an ARM-like fence + op + fence instruction sequence for ARM64 seq_cst atomics; this is safe, but we can do better.  Specifically, the canonical reference [1] has optimized sequences that avoid fences by using only the acquire and release operations, even for seq_cst operation.

Priority: -- → P3
Whiteboard: [arm64:m3]

The optimized atomics are now about to become legal following an update to the memory model: The executive summary is that the old memory model disallowed the use of release-acquire atomic ops for seq_cst operation in JS; the new model is slightly weaker and allows them, and the change is motivated by the desire to allow them on ARM64. (Apparently Chrome already uses weaker atomics here.)

You need to log in before you can comment on or make changes to this bug.