From 4dfeb1c3a84b13188c22e158c5947c68964cddff Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 15 Apr 2016 15:34:07 -0700 Subject: 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 --- src/passes/OptimizeInstructions.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/passes/OptimizeInstructions.cpp') diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index ca79468f5..28cac726a 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -26,6 +26,8 @@ namespace wasm { struct OptimizeInstructions : public WalkerPass> { + bool isFunctionParallel() { return true; } + void visitIf(If* curr) { // flip branches to get rid of an i32.eqz if (curr->ifFalse) { -- cgit v1.2.3