diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-04-30 19:40:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 19:40:30 -0700 |
commit | e020f4a2cb44fcbfd56c95a4a097f08cddc8367e (patch) | |
tree | 4bc1ff221fd7a0bad812c065bb205ee2fa870e30 /src/passes/pass.cpp | |
parent | ec426c6b8ba87c5c5107ed30497ad13252dd3258 (diff) | |
download | binaryen-e020f4a2cb44fcbfd56c95a4a097f08cddc8367e.tar.gz binaryen-e020f4a2cb44fcbfd56c95a4a097f08cddc8367e.tar.bz2 binaryen-e020f4a2cb44fcbfd56c95a4a097f08cddc8367e.zip |
--simplify-locals-nonesting (#1525)
Add a version of simplify-locals which does not create nesting. This keeps the IR flat (in the sense of --flatten).
Also refactor simpify-locals to be a template, so the various modes are all template parameters.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r-- | src/passes/pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 0ec5864e0..ae9484d29 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -108,8 +108,9 @@ void PassRegistry::registerPasses() { registerPass("reorder-locals", "sorts locals by access frequency", createReorderLocalsPass); registerPass("rereloop", "re-optimize control flow using the relooper algorithm", createReReloopPass); registerPass("rse", "remove redundant set_locals", createRedundantSetEliminationPass); - registerPass("simplify-locals", "miscellaneous locals-related optimizations", createSimplifyLocalsPass); registerPass("safe-heap", "instrument loads and stores to check for invalid behavior", createSafeHeapPass); + registerPass("simplify-locals", "miscellaneous locals-related optimizations", createSimplifyLocalsPass); + registerPass("simplify-locals-nonesting", "miscellaneous locals-related optimizations (no nesting at all; preserves flatness)", createSimplifyLocalsNoNestingPass); registerPass("simplify-locals-notee", "miscellaneous locals-related optimizations", createSimplifyLocalsNoTeePass); registerPass("simplify-locals-nostructure", "miscellaneous locals-related optimizations", createSimplifyLocalsNoStructurePass); registerPass("simplify-locals-notee-nostructure", "miscellaneous locals-related optimizations", createSimplifyLocalsNoTeeNoStructurePass); |