Activate load resolver.

This commit is contained in:
chriseth 2019-08-29 16:43:06 +02:00
parent 7dd77784b7
commit edbec012ae
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Compiler Features:
* ABI Output: Change sorting order of functions from selector to kind, name. * ABI Output: Change sorting order of functions from selector to kind, name.
* Optimizer: Add rule that replaces the BYTE opcode by 0 if the first argument is larger than 31. * Optimizer: Add rule that replaces the BYTE opcode by 0 if the first argument is larger than 31.
* Yul Optimizer: Take side-effect-freeness of user-defined functions into account. * Yul Optimizer: Take side-effect-freeness of user-defined functions into account.
* Yul Optimizer: Remove redundant mload/sload operations.
Bugfixes: Bugfixes:

View File

@ -45,6 +45,7 @@
#include <libyul/optimiser/StructuralSimplifier.h> #include <libyul/optimiser/StructuralSimplifier.h>
#include <libyul/optimiser/RedundantAssignEliminator.h> #include <libyul/optimiser/RedundantAssignEliminator.h>
#include <libyul/optimiser/VarNameCleaner.h> #include <libyul/optimiser/VarNameCleaner.h>
#include <libyul/optimiser/LoadResolver.h>
#include <libyul/optimiser/Metrics.h> #include <libyul/optimiser/Metrics.h>
#include <libyul/backends/evm/ConstantOptimiser.h> #include <libyul/backends/evm/ConstantOptimiser.h>
#include <libyul/AsmAnalysis.h> #include <libyul/AsmAnalysis.h>
@ -118,6 +119,7 @@ void OptimiserSuite::run(
ExpressionSimplifier::run(_dialect, ast); ExpressionSimplifier::run(_dialect, ast);
CommonSubexpressionEliminator::run(_dialect, ast); CommonSubexpressionEliminator::run(_dialect, ast);
LoadResolver::run(_dialect, ast);
} }
{ {
@ -132,6 +134,7 @@ void OptimiserSuite::run(
{ {
// simplify again // simplify again
LoadResolver::run(_dialect, ast);
CommonSubexpressionEliminator::run(_dialect, ast); CommonSubexpressionEliminator::run(_dialect, ast);
UnusedPruner::runUntilStabilisedOnFullAST(_dialect, ast, reservedIdentifiers); UnusedPruner::runUntilStabilisedOnFullAST(_dialect, ast, reservedIdentifiers);
} }
@ -161,6 +164,7 @@ void OptimiserSuite::run(
RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast);
RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast);
CommonSubexpressionEliminator::run(_dialect, ast); CommonSubexpressionEliminator::run(_dialect, ast);
LoadResolver::run(_dialect, ast);
} }
{ {
@ -176,6 +180,7 @@ void OptimiserSuite::run(
SSATransform::run(ast, dispenser); SSATransform::run(ast, dispenser);
RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast);
RedundantAssignEliminator::run(_dialect, ast); RedundantAssignEliminator::run(_dialect, ast);
LoadResolver::run(_dialect, ast);
ExpressionSimplifier::run(_dialect, ast); ExpressionSimplifier::run(_dialect, ast);
StructuralSimplifier{_dialect}(ast); StructuralSimplifier{_dialect}(ast);
BlockFlattener{}(ast); BlockFlattener{}(ast);