From 049ff7a828f3e11b2877034dd452481cd7c04f96 Mon Sep 17 00:00:00 2001 From: Roberto Lublinerman Date: Mon, 29 Apr 2024 17:42:06 -0700 Subject: 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. --- src/passes/J2CLOpts.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.3