-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status