summaryrefslogtreecommitdiff
path: root/src/passes/MergeBlocks.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-15 15:34:07 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-15 15:34:07 -0700
commit4dfeb1c3a84b13188c22e158c5947c68964cddff (patch)
tree211536213451e145357727e51f3d1c48a127ea2f /src/passes/MergeBlocks.cpp
parentf2905f962984df939555aad134c48a194b9e270d (diff)
downloadbinaryen-4dfeb1c3a84b13188c22e158c5947c68964cddff.tar.gz
binaryen-4dfeb1c3a84b13188c22e158c5947c68964cddff.tar.bz2
binaryen-4dfeb1c3a84b13188c22e158c5947c68964cddff.zip
Function parallelism (#343)
* allow traversals to mark themselves as function-parallel, in which case we run them using a thread pool. also mark some thread-safety risks (interned strings, arena allocators) with assertions they modify only on the main thread
Diffstat (limited to 'src/passes/MergeBlocks.cpp')
-rw-r--r--src/passes/MergeBlocks.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp
index 578d4fc45..5033d4016 100644
--- a/src/passes/MergeBlocks.cpp
+++ b/src/passes/MergeBlocks.cpp
@@ -24,6 +24,8 @@
namespace wasm {
struct MergeBlocks : public WalkerPass<PostWalker<MergeBlocks>> {
+ bool isFunctionParallel() { return true; }
+
void visitBlock(Block *curr) {
bool more = true;
while (more) {