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

[wasm] Jiterpreter back branch optimizations #84067

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

kg
Copy link
Contributor

@kg kg commented Mar 29, 2023

Right now for large methods, sometimes a trace will not actually contain its back branch targets. In that case we should not generate a loop or dispatch table at the top since it serves no purpose.
Other traces will only contain one reachable back branch target. For those, we can generate a single br_if instead of a br_table, which should be more efficient.

If the cfg only contains one back branch target, use a br_if instead of a br_table
@kg kg added arch-wasm WebAssembly architecture area-Codegen-Jiterpreter-mono labels Mar 29, 2023
@ghost ghost assigned kg Mar 29, 2023
@ghost
Copy link

ghost commented Mar 29, 2023

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

Issue Details

Right now for large methods, sometimes a trace will not actually contain its back branch targets. In that case we should not generate a loop or dispatch table at the top since it serves no purpose.
Other traces will only contain one reachable back branch target. For those, we can generate a single br_if instead of a br_table, which should be more efficient.

Author: kg
Assignees: -
Labels:

arch-wasm, area-Codegen-Jiterpreter-mono

Milestone: -

@kg kg merged commit 91df184 into dotnet:main Mar 29, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants