diff options
author | Christian Parpart <christian@parpart.family> | 2018-11-07 18:18:02 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2018-11-16 20:15:41 +0800 |
commit | f705a45d43d69ca4f29bd496d091f7237bdc31ff (patch) | |
tree | e176c4b1d512bc9f2b0e0353a125a535ccf69691 /test/tools/yulopti.cpp | |
parent | 460c58fbd194fef5add699405238d3ed302a003f (diff) | |
download | dexon-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/tools/yulopti.cpp')
-rw-r--r-- | test/tools/yulopti.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp index 348c5f4a..3e96ef35 100644 --- a/test/tools/yulopti.cpp +++ b/test/tools/yulopti.cpp @@ -38,6 +38,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> @@ -123,7 +124,7 @@ public: } cout << "(q)quit/(f)flatten/(c)se/propagate var(d)ecls/(x)plit/(j)oin/(g)rouper/(h)oister/" << endl; cout << " (e)xpr inline/(i)nline/(s)implify/(u)nusedprune/ss(a) transform/" << endl; - cout << " (r)edundant assign elim./re(m)aterializer? "; + cout << " (r)edundant assign elim./re(m)aterializer/f(o)r-loop-pre-rewriter? "; cout.flush(); int option = readStandardInputChar(); cout << ' ' << char(option) << endl; @@ -134,6 +135,9 @@ public: case 'f': BlockFlattener{}(*m_ast); break; + case 'o': + ForLoopInitRewriter{}(*m_ast); + break; case 'c': (CommonSubexpressionEliminator{})(*m_ast); break; |