aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/YulOptimizerTest.cpp
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-12-04 00:19:37 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-12-07 01:37:35 +0800
commit1eb60cbb3952df395df79ca1737f41708a658d4b (patch)
tree7c48065a0c5f14cac3f22559f5d91544020de859 /test/libyul/YulOptimizerTest.cpp
parent4b2a64306a6b85407210245a47a7df1e0a5e0cbf (diff)
downloaddexon-solidity-1eb60cbb3952df395df79ca1737f41708a658d4b.tar.gz
dexon-solidity-1eb60cbb3952df395df79ca1737f41708a658d4b.tar.zst
dexon-solidity-1eb60cbb3952df395df79ca1737f41708a658d4b.zip
Add structural simplifier as optimization step for Yul.
Diffstat (limited to 'test/libyul/YulOptimizerTest.cpp')
-rw-r--r--test/libyul/YulOptimizerTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libyul/YulOptimizerTest.cpp b/test/libyul/YulOptimizerTest.cpp
index 96b9d263..ba7eced3 100644
--- a/test/libyul/YulOptimizerTest.cpp
+++ b/test/libyul/YulOptimizerTest.cpp
@@ -39,6 +39,7 @@
#include <libyul/optimiser/ExpressionJoiner.h>
#include <libyul/optimiser/SSATransform.h>
#include <libyul/optimiser/RedundantAssignEliminator.h>
+#include <libyul/optimiser/StructuralSimplifier.h>
#include <libyul/optimiser/Suite.h>
#include <libyul/AsmPrinter.h>
#include <libyul/AsmParser.h>
@@ -213,6 +214,11 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
SSATransform::run(*m_ast, nameDispenser);
RedundantAssignEliminator::run(*m_ast);
}
+ else if (m_optimizerStep == "structuralSimplifier")
+ {
+ disambiguate();
+ StructuralSimplifier{}(*m_ast);
+ }
else if (m_optimizerStep == "fullSuite")
OptimiserSuite::run(*m_ast, *m_analysisInfo);
else