[RyuJIT] Eliminate unecessary copies when passing structs #9839
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
optimization
tenet-performance
Performance related issue
Projects
Milestone
Currently the JIT introduces unnecessary copies when passing structs by value.
This impacts both the by-ref passing as in the x86/64 windows ABI, as well as the x86/64 unix ABI - though the impact is worse in the latter case.
This is especially problematic for small structs on x86/64 unix, which are passed in registers but needlessly forced to memory.
Span<T>
and similar types are specific examples of this.This issue started as https://github.com/dotnet/corefx/issues/27238, but is fundamentally a coreclr JIT issue.
The issues linked in this issue have largely been addressed, but this test case still shows unneessary copies: tests/src/JIT/Regression/JitBlue/DevDiv_590358/DevDiv_590358.cs
category:cq
theme:structs
skill-level:expert
cost:large
The text was updated successfully, but these errors were encountered: