diff options
author | chriseth <chris@ethereum.org> | 2019-01-08 22:19:35 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2019-01-08 23:02:14 +0800 |
commit | 5b8b016fae761866a4652285fb193123a0f5f11e (patch) | |
tree | a2da2a750fc17f2b7de81628122e3674594626c5 /libyul/optimiser/Suite.cpp | |
parent | 884d51c1f2bfc5aca7b69f6efe5fd8c475ce0dcc (diff) | |
download | dexon-solidity-5b8b016fae761866a4652285fb193123a0f5f11e.tar.gz dexon-solidity-5b8b016fae761866a4652285fb193123a0f5f11e.tar.zst dexon-solidity-5b8b016fae761866a4652285fb193123a0f5f11e.zip |
Use the block flattener.
Diffstat (limited to 'libyul/optimiser/Suite.cpp')
-rw-r--r-- | libyul/optimiser/Suite.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index e10916ea..48914cf8 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -22,6 +22,7 @@ #include <libyul/optimiser/Disambiguator.h> #include <libyul/optimiser/VarDeclInitializer.h> +#include <libyul/optimiser/BlockFlattener.h> #include <libyul/optimiser/FunctionGrouper.h> #include <libyul/optimiser/FunctionHoister.h> #include <libyul/optimiser/ExpressionSplitter.h> @@ -59,8 +60,10 @@ void OptimiserSuite::run( (VarDeclInitializer{})(ast); (FunctionHoister{})(ast); + (BlockFlattener{})(ast); (FunctionGrouper{})(ast); (ForLoopInitRewriter{})(ast); + (BlockFlattener{})(ast); StructuralSimplifier{_dialect}(ast); NameDispenser dispenser{_dialect, ast}; @@ -75,6 +78,7 @@ void OptimiserSuite::run( CommonSubexpressionEliminator{_dialect}(ast); ExpressionSimplifier::run(_dialect, ast); StructuralSimplifier{_dialect}(ast); + (BlockFlattener{})(ast); SSATransform::run(ast, dispenser); RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast); @@ -95,12 +99,16 @@ void OptimiserSuite::run( RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast); CommonSubexpressionEliminator{_dialect}(ast); + + (FunctionGrouper{})(ast); FullInliner{ast, dispenser}.run(); + SSATransform::run(ast, dispenser); RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast); ExpressionSimplifier::run(_dialect, ast); StructuralSimplifier{_dialect}(ast); + (BlockFlattener{})(ast); CommonSubexpressionEliminator{_dialect}(ast); SSATransform::run(ast, dispenser); RedundantAssignEliminator::run(_dialect, ast); |