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

Disable jiterp safepoints in single-threaded WASM #99558

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

kg
Copy link
Member

@kg kg commented Mar 11, 2024

May make #99554 partially or completely go away.
The introduction of the imm branch opcodes is an improvement for native interp since safepoints are pretty cheap there, but in jiterp safepoints are somewhat expensive (theoretically) because they bloat traces, add more branches to push things out of the branch predictor table, and potentially cause trace compilation to end earlier. Before these superinstructions were added, the relevant branch would have been a non-safepoint branch.

Vlad pointed out the obvious: safepoints don't do anything in single threaded wasm, so the jiterp can just not generate any code for them. This should hopefully make the affected vector code fast again by shrinking traces, and potentially speed up other traces too.

@kg kg added arch-wasm WebAssembly architecture area-Codegen-Interpreter-mono labels Mar 11, 2024
Copy link
Contributor

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

Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@kg kg marked this pull request as ready for review March 11, 2024 19:55
@kg kg requested review from lewing and pavelsavara as code owners March 11, 2024 19:55
@kg kg merged commit 6cb660d into dotnet:main Mar 12, 2024
36 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants