diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2019-01-16 18:44:45 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2019-01-18 03:37:43 +0800 |
commit | 6de2d92f20d48d38797a628ee35e7615170cd63f (patch) | |
tree | 7d34e8c7655b8558061fd58de1bc26f6e44f1aaa /libyul/optimiser/Suite.cpp | |
parent | 7c07e9498664c9b9dec6f332490d51c7a920de8b (diff) | |
download | dexon-solidity-6de2d92f20d48d38797a628ee35e7615170cd63f.tar.gz dexon-solidity-6de2d92f20d48d38797a628ee35e7615170cd63f.tar.zst dexon-solidity-6de2d92f20d48d38797a628ee35e7615170cd63f.zip |
Add SSAReverser to the yul optimiser.
Diffstat (limited to 'libyul/optimiser/Suite.cpp')
-rw-r--r-- | libyul/optimiser/Suite.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index 38c0bf49..63931554 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -35,6 +35,7 @@ #include <libyul/optimiser/UnusedPruner.h> #include <libyul/optimiser/ExpressionSimplifier.h> #include <libyul/optimiser/CommonSubexpressionEliminator.h> +#include <libyul/optimiser/SSAReverser.h> #include <libyul/optimiser/SSATransform.h> #include <libyul/optimiser/StructuralSimplifier.h> #include <libyul/optimiser/RedundantAssignEliminator.h> @@ -88,9 +89,10 @@ void OptimiserSuite::run( UnusedPruner::runUntilStabilised(_dialect, ast, reservedIdentifiers); CommonSubexpressionEliminator{_dialect}(ast); UnusedPruner::runUntilStabilised(_dialect, ast, reservedIdentifiers); - SSATransform::run(ast, dispenser); - RedundantAssignEliminator::run(_dialect, ast); - RedundantAssignEliminator::run(_dialect, ast); + + SSAReverser{}(ast); + CommonSubexpressionEliminator{_dialect}(ast); + UnusedPruner::runUntilStabilised(_dialect, ast, reservedIdentifiers); ExpressionJoiner::run(ast); ExpressionJoiner::run(ast); @@ -127,6 +129,11 @@ void OptimiserSuite::run( UnusedPruner::runUntilStabilised(_dialect, ast); ExpressionJoiner::run(ast); UnusedPruner::runUntilStabilised(_dialect, ast); + + SSAReverser{}(ast); + CommonSubexpressionEliminator{_dialect}(ast); + UnusedPruner::runUntilStabilised(_dialect, ast, reservedIdentifiers); + ExpressionJoiner::run(ast); Rematerialiser::run(_dialect, ast); UnusedPruner::runUntilStabilised(_dialect, ast); |