summaryrefslogtreecommitdiff
path: root/src/passes/J2CLOpts.cpp
diff options
context:
space:
mode:
authorRoberto Lublinerman <rluble@google.com>2024-04-29 17:42:06 -0700
committerGitHub <noreply@github.com>2024-04-30 00:42:06 +0000
commit049ff7a828f3e11b2877034dd452481cd7c04f96 (patch)
tree5152c18add92221f39d5f08fab49071102e863ab /src/passes/J2CLOpts.cpp
parent497ffe211d68debcca05bf67e8439206db100cd3 (diff)
downloadbinaryen-049ff7a828f3e11b2877034dd452481cd7c04f96.tar.gz
binaryen-049ff7a828f3e11b2877034dd452481cd7c04f96.tar.bz2
binaryen-049ff7a828f3e11b2877034dd452481cd7c04f96.zip
J2CLOpts: Add "precompute" and "remove-unused-brs" as additional cleanup
This makes the cleanup of bodies of functions that have had constants hoisted from them more effective.
Diffstat (limited to 'src/passes/J2CLOpts.cpp')
-rw-r--r--src/passes/J2CLOpts.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/J2CLOpts.cpp b/src/passes/J2CLOpts.cpp
index 78edecc45..97129d2cc 100644
--- a/src/passes/J2CLOpts.cpp
+++ b/src/passes/J2CLOpts.cpp
@@ -105,6 +105,8 @@ public:
// TODO: maybe we should not introduce "nop" in the first place and try
// removing instead.
PassRunner runner(getModule());
+ runner.add("precompute");
+ runner.add("remove-unused-brs");
runner.add("vacuum");
runner.setIsNested(true);
runner.runOnFunction(curr);