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/DeadCodeElimination.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/DeadCodeElimination.cpp')
-rw-r--r-- | src/passes/DeadCodeElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index 058d9e4e4..dcbac960e 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -195,7 +195,7 @@ struct DeadCodeElimination reachableBreaks.erase(curr->name); } if (isUnreachable(curr->body) && - !BranchUtils::BranchSeeker::hasNamed(curr->body, curr->name)) { + !BranchUtils::BranchSeeker::has(curr->body, curr->name)) { replaceCurrent(curr->body); return; } |