summaryrefslogtreecommitdiff
path: root/src/passes/RemoveUnusedModuleElements.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-08-27 16:40:59 -0700
committerGitHub <noreply@github.com>2019-08-27 16:40:59 -0700
commitcb0b31a2d185f18662814c9f3c9158b2eea74760 (patch)
tree4fe23ff2abb08af7a804f6e6755b07454f79f45d /src/passes/RemoveUnusedModuleElements.cpp
parentf070e8c10a15a02735fbd9b88c4c569a8c786933 (diff)
downloadbinaryen-cb0b31a2d185f18662814c9f3c9158b2eea74760.tar.gz
binaryen-cb0b31a2d185f18662814c9f3c9158b2eea74760.tar.bz2
binaryen-cb0b31a2d185f18662814c9f3c9158b2eea74760.zip
Add atomic.fence instruction (#2307)
This adds `atomic.fence` instruction: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#fence-operator This also fix bugs in `atomic.wait` and `atomic.notify` instructions in binaryen.js and adds tests for them.
Diffstat (limited to 'src/passes/RemoveUnusedModuleElements.cpp')
-rw-r--r--src/passes/RemoveUnusedModuleElements.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp
index 20c30d271..d4c6d5a5d 100644
--- a/src/passes/RemoveUnusedModuleElements.cpp
+++ b/src/passes/RemoveUnusedModuleElements.cpp
@@ -106,6 +106,7 @@ struct ReachabilityAnalyzer : public PostWalker<ReachabilityAnalyzer> {
void visitAtomicRMW(AtomicRMW* curr) { usesMemory = true; }
void visitAtomicWait(AtomicWait* curr) { usesMemory = true; }
void visitAtomicNotify(AtomicNotify* curr) { usesMemory = true; }
+ void visitAtomicFence(AtomicFence* curr) { usesMemory = true; }
void visitMemoryInit(MemoryInit* curr) { usesMemory = true; }
void visitDataDrop(DataDrop* curr) { usesMemory = true; }
void visitMemoryCopy(MemoryCopy* curr) { usesMemory = true; }