diff options
author | Alon Zakai <azakai@google.com> | 2019-12-04 13:04:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-04 13:04:57 -0800 |
commit | 4056443a5c926ac009b455bf6774445edb6050ba (patch) | |
tree | 4b6c17d538bcfc1637289fc78bfb296da4aab482 /src/passes/MergeBlocks.cpp | |
parent | a2f1a6375a596b3dea6fa615f6ff544c368c3991 (diff) | |
download | binaryen-4056443a5c926ac009b455bf6774445edb6050ba.tar.gz binaryen-4056443a5c926ac009b455bf6774445edb6050ba.tar.bz2 binaryen-4056443a5c926ac009b455bf6774445edb6050ba.zip |
Remove 'none' type as a branch target in ReFinalize (#2492)
That was needed for super-old wasm type system, where we allowed
(block $x
(br_if $x
(unreachable)
(nop)
)
)
That is, we differentiated "taken" branches from "named" ones (just
referred to by name, but not actually taken as it's in unreachable code).
We don't need to differentiate those any more. Remove the ReFinalize
code that considered it, and also remove the named/taken distinction in
other places.
Diffstat (limited to 'src/passes/MergeBlocks.cpp')
-rw-r--r-- | src/passes/MergeBlocks.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index babbf77ba..8e04ed47f 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -287,7 +287,7 @@ optimizeBlock(Block* curr, Module* module, PassOptions& passOptions) { auto childName = childBlock->name; for (size_t j = 0; j < childSize; j++) { auto* item = childList[j]; - if (BranchUtils::BranchSeeker::hasNamed(item, childName)) { + if (BranchUtils::BranchSeeker::has(item, childName)) { // We can't remove this from the child. keepStart = j; keepEnd = childSize; @@ -300,7 +300,7 @@ optimizeBlock(Block* curr, Module* module, PassOptions& passOptions) { auto childName = loop->name; for (auto j = int(childSize - 1); j >= 0; j--) { auto* item = childList[j]; - if (BranchUtils::BranchSeeker::hasNamed(item, childName)) { + if (BranchUtils::BranchSeeker::has(item, childName)) { // We can't remove this from the child. keepStart = 0; keepEnd = std::max(Index(j + 1), keepEnd); |