From 719b4d7d7897e25e5868989f0c708565e12d3295 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 15 Jan 2020 11:04:23 -0800 Subject: Optimize passive segments in memory-packing (#2426) When memory is packed and there are passive segments, bulk memory operations that reference those segments by index need to be updated to reflect the new indices and possibly split into multiple instructions that reference multiple split segments. For some bulk-memory operations, it is necessary to introduce new globals to explicitly track the drop state of the original segments, but this PR is careful to only add globals where necessary. --- src/tools/asm2wasm.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/tools/asm2wasm.cpp') diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index 6b20d1bcb..8b7e4b1b7 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -249,15 +249,6 @@ int main(int argc, const char* argv[]) { wasmOnly); asm2wasm.processAsm(asmjs); - // finalize the imported mem init - if (memInit != options.extra.end()) { - if (options.runningDefaultOptimizationPasses()) { - PassRunner runner(&wasm); - runner.add("memory-packing"); - runner.run(); - } - } - // Set the max memory size, if requested const auto& memMax = options.extra.find("mem max"); if (memMax != options.extra.end()) { -- cgit v1.2.3