[Arm64/Windows] Optimize JIT_WriteBarriers
Test and enable JIT_WriteBarriers optimizations from dotnet/coreclr#12334
These were causing contract violations so Windows support was removed.
category:cq theme:runtime skill-level:expert cost:small
@jkotas I think label might be arch-arm64 instead ?
Why don't we inline WriteBarriers into jitted code and using runtime helper instead? I believe it would be the best optimization.
These are the runtime helpers that need to be optimized
Why don't we inline WriteBarriers into jitted code
@rartemev It may make sense for higher tiers of the JIT eventually. It does not make sense for the default optimization level because of it would lead to significant code bloat.
In additional to the code bloat factor, we are getting the following benefits from using the central helper:
- The central helper can be patched to adjust for changing GC heap geometry. Inlined write barriers would require extra indirections to do the same.
- The central helper is implicit "no GC" region. Inlined write barriers would need to be marked as explicit no GC regions in GC info.
@adityamandaleeka is this resolved by dotnet/coreclr#22003?
Yes, I'll close this once that's merged. Unfortunately, the ARM64 CI has been in terrible shape (long waits and general flakiness).
@adityamandaleeka Close?
Yup, thanks!