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

Dedicated operation for general CFG, for the loop/switch case. #371

Closed
ghost opened this issue Sep 24, 2015 · 1 comment
Closed

Dedicated operation for general CFG, for the loop/switch case. #371

ghost opened this issue Sep 24, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 24, 2015

While I support producers working hard to avoid the use of loop/switch, it does not appear to be avoidable with the current constraints, and the changes in #299 do not appear to make any change to the need for loop/switch based on my reading of the discussion so it will remain as frequent as for asm.js.

Some wasm runtimes would be expected to be able to handle general CFGs from the start, such as runtimes using llvm as a backend, and these could usefully recognize the loop/switch pattern and use jump threading to convert it to a CFG. Perhaps moving forward more runtimes will handle this well too, so the use of loop/switch in code will become baggage.

If code is going to need to fall back to using loop/switch for some CFGs, and given that at least some consumers can optimize this well, then I suggest a separate operation for this pattern that is easier to recognize, an operation that would be understood to emit a loop/switch if the compiler did not support general CFGs.

@ghost
Copy link
Author

ghost commented Feb 25, 2016

Looks like wasm is all-in on the 'fast ssa conversion of structured code', so other approaches are probably more appropriate.

@ghost ghost closed this as completed Feb 25, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants