diff options
author | chriseth <chris@ethereum.org> | 2018-12-06 06:42:55 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2019-01-07 21:03:32 +0800 |
commit | 2e9c70add0490a5157f393c78e29bb86f67111d7 (patch) | |
tree | aa182a37aa5cc21be1144041ad3d6df803e9c255 /libyul/optimiser/Suite.cpp | |
parent | aca9e581454585fab494a87febb7da3278e3aa7b (diff) | |
download | dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.gz dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.zst dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.zip |
Use rematerializer if variable is unreferenced or value is "cheap".
Diffstat (limited to 'libyul/optimiser/Suite.cpp')
-rw-r--r-- | libyul/optimiser/Suite.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index bfba8dfc..c0fd15a2 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -105,14 +105,17 @@ void OptimiserSuite::run( RedundantAssignEliminator::run(ast); RedundantAssignEliminator::run(ast); UnusedPruner::runUntilStabilised(ast, reservedIdentifiers); + CommonSubexpressionEliminator{}(ast); } ExpressionJoiner::run(ast); + Rematerialiser::run(ast); UnusedPruner::runUntilStabilised(ast); ExpressionJoiner::run(ast); UnusedPruner::runUntilStabilised(ast); ExpressionJoiner::run(ast); UnusedPruner::runUntilStabilised(ast); ExpressionJoiner::run(ast); + Rematerialiser::run(ast); UnusedPruner::runUntilStabilised(ast); _ast = std::move(ast); |