aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-08 19:21:45 +0800
committerGitHub <noreply@github.com>2018-11-08 19:21:45 +0800
commitbf5b36a1ed8567b7b3bc27beb84d25ac9d0bf89c (patch)
tree47b5ce32339374e1a04dbf08a5743f1cd7e91b91 /test
parentfce1c3a9e74f636d9b714f2c34414128392cfaee (diff)
parent37766ee8e4333aef569240dc7e08464e52221b14 (diff)
downloaddexon-solidity-bf5b36a1ed8567b7b3bc27beb84d25ac9d0bf89c.tar.gz
dexon-solidity-bf5b36a1ed8567b7b3bc27beb84d25ac9d0bf89c.tar.zst
dexon-solidity-bf5b36a1ed8567b7b3bc27beb84d25ac9d0bf89c.zip
Merge pull request #5366 from ethereum/addVarDecl
[Yul] Add VarDeclPropagator to full suite and interactive optimizer.
Diffstat (limited to 'test')
-rw-r--r--test/tools/yulopti.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp
index 68fc9f4f..348c5f4a 100644
--- a/test/tools/yulopti.cpp
+++ b/test/tools/yulopti.cpp
@@ -45,6 +45,7 @@
#include <libyul/optimiser/ExpressionJoiner.h>
#include <libyul/optimiser/RedundantAssignEliminator.h>
#include <libyul/optimiser/SSATransform.h>
+#include <libyul/optimiser/VarDeclPropagator.h>
#include <libdevcore/JSON.h>
@@ -120,7 +121,7 @@ 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/" << endl;
+ 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.flush();
@@ -136,6 +137,9 @@ public:
case 'c':
(CommonSubexpressionEliminator{})(*m_ast);
break;
+ case 'd':
+ (VarDeclPropagator{})(*m_ast);
+ break;
case 'x':
ExpressionSplitter{*m_nameDispenser}(*m_ast);
break;