diff options
author | chriseth <chris@ethereum.org> | 2018-10-24 23:54:35 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-24 23:54:35 +0800 |
commit | f92623063db260814111aa14471f149e1f7267ca (patch) | |
tree | bfd96bf8ec5bcd1b1261c7c0021152a0b691c6a3 | |
parent | 57843f790c48fc653e12a9c4a8e01dc2e41dd56e (diff) | |
download | dexon-solidity-f92623063db260814111aa14471f149e1f7267ca.tar.gz dexon-solidity-f92623063db260814111aa14471f149e1f7267ca.tar.zst dexon-solidity-f92623063db260814111aa14471f149e1f7267ca.zip |
Add redundant assign and ssa.
-rw-r--r-- | test/tools/yulopti.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp index 34d0f5c9..83c54959 100644 --- a/test/tools/yulopti.cpp +++ b/test/tools/yulopti.cpp @@ -43,6 +43,8 @@ #include <libyul/optimiser/ExpressionSimplifier.h> #include <libyul/optimiser/UnusedPruner.h> #include <libyul/optimiser/ExpressionJoiner.h> +#include <libyul/optimiser/RedundantAssignEliminator.h> +#include <libyul/optimiser/SSATransform.h> #include <libdevcore/JSON.h> @@ -118,7 +120,8 @@ public: m_nameDispenser = make_shared<NameDispenser>(*m_ast); disambiguated = true; } - cout << "(q)quit/(f)flatten/(c)se/(x)plit/(j)oin/(g)rouper/(h)oister/(e)xpr inline/(i)nline/(s)implify/(u)nusedprune? "; + cout << "(q)quit/(f)flatten/(c)se/(x)plit/(j)oin/(g)rouper/(h)oister/" << endl; + cout << " (e)xpr inline/(i)nline/(s)implify/(u)nusedprune/ss(a) transform/(r)edundant assign elim.? "; cout.flush(); int option = readStandardInputChar(); cout << ' ' << char(option) << endl; @@ -156,6 +159,12 @@ public: case 'u': UnusedPruner::runUntilStabilised(*m_ast); break; + case 'a': + SSATransform::run(*m_ast, *m_nameDispenser); + break; + case 'r': + RedundantAssignEliminator::run(*m_ast); + break; default: cout << "Unknown option." << endl; } |