-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
stage2-wasm: implement AIR handling for labeled switch/continue #21450
base: master
Are you sure you want to change the base?
stage2-wasm: implement AIR handling for labeled switch/continue #21450
Conversation
Old code could not handle > 32 bits case + there were no test case for this so I added one. By mostly purging previous logic, I deleted special handling of non-sparse switch case branching, which were emitting .br_table for wasm VM level optimisation. I think we do not need this complexity for debug wasm backend.
this is luuk's area, i know next to nothing about this backend lol |
The self-hosted backends are not just for debug builds; that's the initial focus, but our goal is to eventually provide optimization passes to make them useful for release builds too. It's currently unclear what this will look like implementation-wise, but I don't like the idea of eliminating existing optimized lowerings for (AFAICT) no real gain. |
I thought you did implement airRepeat handling because of this commit cb68c09? |
No, Luuk wrote most of that commit, the authorship information unfortunately was unintentionally lost through some cherry-picks and squashes I did. |
I am myself a proponent of even having some simple optimization in debug build for performance. But in the WASM backend context, because any reasonable VM implementation does advanced control-flow analysis during lowering to native code, the benefit is miniscule. |
It doesn't matter. Zig's task is to output the best wasm code given the constraints (optimization mode, cpu features, etc). |
Read commit messages.