diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-07-16 16:27:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-16 16:27:38 -0700 |
commit | cd61f6a1ae959cc3ee22f4e72f0f4ba73c2abbd1 (patch) | |
tree | eef538171ffef9c72ca9d319d93a1f56bd47cd85 /src/passes/DeadCodeElimination.cpp | |
parent | ce8ee20462a465f00520dbe0dd2aa3e1601f4ca1 (diff) | |
parent | 07170478897c81aa973217ae8070d2d155d16b2e (diff) | |
download | binaryen-cd61f6a1ae959cc3ee22f4e72f0f4ba73c2abbd1.tar.gz binaryen-cd61f6a1ae959cc3ee22f4e72f0f4ba73c2abbd1.tar.bz2 binaryen-cd61f6a1ae959cc3ee22f4e72f0f4ba73c2abbd1.zip |
Merge pull request #644 from WebAssembly/fix-debug
Fix dce bug in non-parallel mode, which happens in debug mode
Diffstat (limited to 'src/passes/DeadCodeElimination.cpp')
-rw-r--r-- | src/passes/DeadCodeElimination.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index 9562b2973..de1191131 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -40,7 +40,12 @@ struct DeadCodeElimination : public WalkerPass<PostWalker<DeadCodeElimination, V Pass* create() override { return new DeadCodeElimination; } // whether the current code is actually reachable - bool reachable = true; + bool reachable; + + void doWalkFunction(Function* func) { + reachable = true; + walk(func->body); + } std::set<Name> reachableBreaks; |