summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pass.h b/src/pass.h
index 4f9cd1b68..45dd549d1 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -107,6 +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
+ // 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.
+ // (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;
// 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