aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/YulOptimizerTest.cpp
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-11-07 18:18:02 +0800
committerChristian Parpart <christian@ethereum.org>2018-11-16 20:15:41 +0800
commitf705a45d43d69ca4f29bd496d091f7237bdc31ff (patch)
treee176c4b1d512bc9f2b0e0353a125a535ccf69691 /test/libyul/YulOptimizerTest.cpp
parent460c58fbd194fef5add699405238d3ed302a003f (diff)
downloaddexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.tar.gz
dexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.tar.zst
dexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.zip
[Yul] Implements a pass to rewrite for-loop's pre block into the parent's Block.
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 03cd6446..9e257717 100644
--- a/test/libyul/YulOptimizerTest.cpp
+++ b/test/libyul/YulOptimizerTest.cpp
@@ -31,6 +31,7 @@
#include <libyul/optimiser/FunctionHoister.h>
#include <libyul/optimiser/ExpressionInliner.h>
#include <libyul/optimiser/FullInliner.h>
+#include <libyul/optimiser/ForLoopInitRewriter.h>
#include <libyul/optimiser/MainFunction.h>
#include <libyul/optimiser/Rematerialiser.h>
#include <libyul/optimiser/ExpressionSimplifier.h>
@@ -108,6 +109,11 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
disambiguate();
VarDeclPropagator{}(*m_ast);
}
+ else if (m_optimizerStep == "forLoopInitRewriter")
+ {
+ disambiguate();
+ ForLoopInitRewriter{}(*m_ast);
+ }
else if (m_optimizerStep == "commonSubexpressionEliminator")
{
disambiguate();