-
Notifications
You must be signed in to change notification settings - Fork 770
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
Potential optimization opportunity: Tablify sequences of ifs #2724
Comments
This type of pattern is pretty hard to match in general. How about doing the opposite, creating a |
I see, hmm. The problem with emitting a But, reading your comment, I'm wondering if there is already something in place (that I missed) to lower such a table right away, upon the Relooper's |
Created a little helper on our end now that builds a |
Closing because the requested feature is no longer necessary. |
So far we have been using sequences of
br_if
s to hint to Binaryen that these might be suitable candidates for abr_table
if conditions are dense constants potentially. While this works well, there are occasions where it is easier / more idiomatic to emit sequences of normalif
s, either manually or using theRelooper
saddBranch
, but these don't benefit from RemoveUnusedBrs's tablify. Typical code is:or
where at some point converting to a
br_table
seems to become more efficient.The text was updated successfully, but these errors were encountered: