Skip to content

Conversation

@kg
Copy link
Member

@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
@kg kg requested review from lewing and pavelsavara as code owners March 29, 2023 09:37
@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.

2 participants