diff options
author | Alon Zakai <azakai@google.com> | 2022-09-07 17:13:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 00:13:10 +0000 |
commit | d4d33b1e175c962548347c59339783c11d5d1a23 (patch) | |
tree | 6af9da0d244365d3bbc7f5ecb7d3346cd2d643af /src | |
parent | d81caf99281b0054b98e27e3665f251add6c1d79 (diff) | |
download | binaryen-d4d33b1e175c962548347c59339783c11d5d1a23.tar.gz binaryen-d4d33b1e175c962548347c59339783c11d5d1a23.tar.bz2 binaryen-d4d33b1e175c962548347c59339783c11d5d1a23.zip |
[Effects] Fix hasAnything on mutable global state (#5026)
We explicitly wrote out memory, table, and globals, but did not add structs. This switches
us to use readsMutableGlobalState which has the full list of all relevant global state,
including the memory, table, and globals as well as structs.
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/effects.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index f5fdc5184..d3ae9ba20 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -188,8 +188,7 @@ public: } bool hasAnything() const { - return hasSideEffects() || accessesLocal() || readsMemory || readsTable || - accessesMutableGlobal(); + return hasSideEffects() || accessesLocal() || readsMutableGlobalState(); } // check if we break to anything external from ourselves |