Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Investigate what to do about store forwarding stalls due to block copies #100769

Open
jakobbotsch opened this issue Apr 8, 2024 · 1 comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@jakobbotsch
Copy link
Member

When struct copies are transformed into block copies it can lead to store forwarding stalls if the block copy involves padding that was never written. #96524 and #100750 (comment) are examples that show some of the potential cost of these stalls. #99835 (comment) has some discussion as well.

It's possible to generate these struct copies without accessing any padding, but it is at the expense of larger code that is probably slower if the source was also written as a block op, so it is not clear what the right trade off is.

I am also not sure how good the CPUs are at reconstructing the source from several stores. For example, if we wrote both Span<T>._reference and Span<T>._length as 8 bytes, would a 16-byte SIMD read still stall? If it doesn't then perhaps we could alleviate some issues by cheaply extending some stores to cover padding as well.

cc @dotnet/jit-contrib @stephentoub

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 8, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 8, 2024
@jakobbotsch jakobbotsch added this to the Future milestone Apr 8, 2024
@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

1 participant