diff options
author | Alon Zakai <azakai@google.com> | 2020-10-27 15:30:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 15:30:51 -0700 |
commit | c015eebaee6161112eb82b1faa892c864ddffa27 (patch) | |
tree | 9b9f4a1c7ce9f896178756e737e5df5991f3cc67 | |
parent | 9abf63c578d64bd7029f6d4f848e0ff083f67c9b (diff) | |
download | binaryen-c015eebaee6161112eb82b1faa892c864ddffa27.tar.gz binaryen-c015eebaee6161112eb82b1faa892c864ddffa27.tar.bz2 binaryen-c015eebaee6161112eb82b1faa892c864ddffa27.zip |
Rename unmodifiedImportedMemory => zeroFilledMemory (#3285)
-rw-r--r-- | src/pass.h | 8 | ||||
-rw-r--r-- | src/tools/optimization-options.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/pass.h b/src/pass.h index 45dd549d1..3b055cee9 100644 --- a/src/pass.h +++ b/src/pass.h @@ -107,15 +107,15 @@ struct PassOptions { // forth (which IEEE floats do not, strictly speaking). This is inspired by // gcc/clang's -ffast-math flag. bool fastMath = false; - // Whether to assume that an imported memory has not been modified. Without + // Whether to assume that an imported memory is zero-initialized. Without // this, we can do fewer optimizations on memory segments, because if memory // *was* modified then the wasm's segments may trample those previous - // modifications. If memory was not modified, we can assume it starts as zero, - // which allows us to remove zeros from wasm's segments. + // modifications. If memory was zero-initialized then we can remove zeros from + // the wasm's segments. // (This is not a problem if the memory is *not* imported, since then wasm // creates it and we know it is all zeros right before the active segments are // applied.) - bool unmodifiedImportedMemory = false; + bool zeroFilledMemory = false; // Whether to try to preserve debug info through, which are special calls. bool debugInfo = false; // Arbitrary string arguments from the commandline, which we forward to diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h index f89dab347..4f5c9e0d1 100644 --- a/src/tools/optimization-options.h +++ b/src/tools/optimization-options.h @@ -194,12 +194,12 @@ struct OptimizationOptions : public ToolOptions { "Optimize floats without handling corner cases of NaNs and rounding", Options::Arguments::Zero, [this](Options*, const std::string&) { passOptions.fastMath = true; }) - .add("--unmodified-imported-mem", + .add("--zero-filled-memory", "-uim", - "Assume that an imported memory will not have been modified", + "Assume that an imported memory will be zero-initialized", Options::Arguments::Zero, [this](Options*, const std::string&) { - passOptions.unmodifiedImportedMemory = true; + passOptions.zeroFilledMemory = true; }); // add passes in registry for (const auto& p : PassRegistry::get()->getRegisteredNames()) { |