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

Split up br_if and br_table into multiple IR codes #19

Open
fengb opened this issue Dec 15, 2021 · 0 comments
Open

Split up br_if and br_table into multiple IR codes #19

fengb opened this issue Dec 15, 2021 · 0 comments

Comments

@fengb
Copy link
Owner

fengb commented Dec 15, 2021

Right now the code translates all the branches to be the same. If we had multiple different codes, we might be able to exploit branch prediction a bit better.

Example:

i32.load 1;
br_if 1;
i32.load 2;
br_if 2;

These two branches don't have much in common, but the predictor is forced to use the same branch. If these were 2 different opcodes, we would have 2 different bodies so the branch predictor can do a better job isolating events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant