Skip to content

Disable jiterp safepoints in single-threaded WASM - #99558

Merged
kg merged 2 commits into
dotnet:mainfrom
kg:wasm-jiterp-safepoint-st
Mar 12, 2024
Merged

kg merged 2 commits into
dotnet:mainfrom
kg:wasm-jiterp-safepoint-st

Conversation

@kg

@kg kg commented Mar 11, 2024

Copy link
Copy Markdown
Contributor

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
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@dotnet-policy-service

Copy link
Copy Markdown
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
@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