-
-
Notifications
You must be signed in to change notification settings - Fork 670
start function optimization #14
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
Comments
Yeah, the start function is automatically generated from all the top level statements. Running Binaryen's inlining pass will most likely optimize this away. Once this PR lands in Binaryen, |
I think this can already be closed |
What' still happening, though, is that if the start function becomes empty after optimizations, it is not removed by the optimizer. Looks like:
|
Sorry. I checked in WebAssembly Studio and this true. But in Assembleash I use this config: module.runPasses([ "trap-mode-clamp" ]);
module.setOptimizeLevel(3);
module.setShrinkLevel(2); And this inlined perfectly. You can check |
Just checked: Try to compile just |
I see, yeah, the inlining works, but the start function is still there, though it could be removed. |
But this is normal... or not? I thought start should be always present |
It is not required that it's there, so imho it should be removed. This is a Binaryen specific thing, of course. |
Cool! |
Alright, the last remaining bits should be fixed as well using latest Binaryen. Closing for good. |
output
an unnecessary $.start function is created.
most likely this will automatically be corrected if you add inline function support (#12)
The text was updated successfully, but these errors were encountered: