aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/YulOptimizerTest.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-11 20:48:57 +0800
committerchriseth <chris@ethereum.org>2018-10-12 00:41:26 +0800
commit33ac415f7fd3e05727959d2fd4963910f2763ab8 (patch)
tree64946f861826a915053dd5e3d2426938be166087 /test/libjulia/YulOptimizerTest.cpp
parent5f5dc8956d39ab19c5408aa4c39a3cd10d3a2dec (diff)
downloaddexon-solidity-33ac415f7fd3e05727959d2fd4963910f2763ab8.tar.gz
dexon-solidity-33ac415f7fd3e05727959d2fd4963910f2763ab8.tar.zst
dexon-solidity-33ac415f7fd3e05727959d2fd4963910f2763ab8.zip
Move common subexpression eliminator tests.
Diffstat (limited to 'test/libjulia/YulOptimizerTest.cpp')
-rw-r--r--test/libjulia/YulOptimizerTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libjulia/YulOptimizerTest.cpp b/test/libjulia/YulOptimizerTest.cpp
index fd15623c..75a3d69b 100644
--- a/test/libjulia/YulOptimizerTest.cpp
+++ b/test/libjulia/YulOptimizerTest.cpp
@@ -22,6 +22,8 @@
#include <test/Options.h>
#include <libjulia/optimiser/Disambiguator.h>
+#include <libjulia/optimiser/CommonSubexpressionEliminator.h>
+
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/inlineasm/AsmPrinter.h>
#include <libsolidity/inlineasm/AsmParser.h>
@@ -80,6 +82,11 @@ bool YulOptimizerTest::run(ostream& _stream, string const& _linePrefix, bool con
if (m_optimizerStep == "disambiguator")
disambiguate();
+ else if (m_optimizerStep == "commonSubexpressionEliminator")
+ {
+ disambiguate();
+ (CommonSubexpressionEliminator{})(*m_ast);
+ }
else
{
FormattedScope(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Invalid optimizer step: " << m_optimizerStep << endl;