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

Optimize out memory and table when possible #1352

Merged
merged 13 commits into from Jan 10, 2018

Conversation

Projects
None yet
2 participants
@kripken
Member

kripken commented Jan 9, 2018

We can remove the memory/table (itself, or an import if imported) if they are not used. This is pretty minor on a large wasm file, but when reading small wasts it's very noticeable to have an unused memory and table all the time.

kripken added some commits Jan 9, 2018

fix
Revert "debug some more?"
This reverts commit 39511ee.
Revert "debug"
This reverts commit 0be211c.
@kripken

This comment has been minimized.

Member

kripken commented Jan 10, 2018

It would be good to land this soon, as it blocks some emscripten work. Nothing super-urgent, but if you're deciding which binaryen PR to review, maybe make it this one :)

@@ -915,6 +978,9 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
auto* func = pair.second;
passRunner.runFunction(func);
}
for (auto* func : extraSupportFunctions) {
passRunner.runFunction(func);

This comment has been minimized.

@dschuff

dschuff Jan 10, 2018

Member

the runFunction name is confusing. we aren't running the function, we're running the optimizations on the function.

This comment has been minimized.

@kripken

kripken Jan 10, 2018

Member

Good point, thanks. I'll fix in a new PR.

@kripken kripken merged commit 623e42a into master Jan 10, 2018

@kripken kripken deleted the remove-mem-table branch Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment