diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-01-15 11:04:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 11:04:23 -0800 |
commit | 719b4d7d7897e25e5868989f0c708565e12d3295 (patch) | |
tree | a9f1799c32377bf33c3662d3a233851bd6ff85b8 /src/tools/asm2wasm.cpp | |
parent | 5ca79a71b2a2379083093d4d9136b2ae4095dfe8 (diff) | |
download | binaryen-719b4d7d7897e25e5868989f0c708565e12d3295.tar.gz binaryen-719b4d7d7897e25e5868989f0c708565e12d3295.tar.bz2 binaryen-719b4d7d7897e25e5868989f0c708565e12d3295.zip |
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.
Diffstat (limited to 'src/tools/asm2wasm.cpp')
-rw-r--r-- | src/tools/asm2wasm.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
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()) { |