summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-09-03 16:11:05 -0700
committerGitHub <noreply@github.com>2020-09-03 16:11:05 -0700
commit44df23efd69fd2dd4c260755c82ddede226c40ff (patch)
treed828947439ac4dd47fc023b176b86d4949890b81 /src/wasm/wasm-validator.cpp
parent132c72bb5e93591de34a9bfc267e4a2007908626 (diff)
downloadbinaryen-44df23efd69fd2dd4c260755c82ddede226c40ff.tar.gz
binaryen-44df23efd69fd2dd4c260755c82ddede226c40ff.tar.bz2
binaryen-44df23efd69fd2dd4c260755c82ddede226c40ff.zip
Optimize MergeBlocks by caching branch results (#3102)
BranchSeekerCache caches the set of branches in a node + its children, and helps compute new results by looking in the cache and using data for the children. This avoids quadratic time in the common case of a post-walk on a tower of nested blocks which is common in a switch. Fixes #3090 . On the testcase there this pass goes from over a minute to less than a second.
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 8410cc0b2..3e1a057ce 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -19,7 +19,6 @@
#include <sstream>
#include <unordered_set>
-#include "ir/branch-utils.h"
#include "ir/features.h"
#include "ir/global-utils.h"
#include "ir/module-utils.h"