Tune the suite.

This commit is contained in:
chriseth 2019-11-27 11:51:06 +01:00
parent 7c063987c2
commit 9e9b643b93
2 changed files with 32 additions and 0 deletions

View File

@ -184,6 +184,18 @@ void OptimiserSuite::run(
}, ast); }, ast);
} }
{
// Prune a bit more in SSA
suite.runSequence({
ExpressionSplitter::name,
SSATransform::name,
RedundantAssignEliminator::name,
UnusedPruner::name,
RedundantAssignEliminator::name,
UnusedPruner::name,
}, ast);
}
{ {
// Turn into SSA again and simplify // Turn into SSA again and simplify
suite.runSequence({ suite.runSequence({

View File

@ -0,0 +1,20 @@
{
let x := 0
switch mload(x)
case 0 { x := x }
case 1 { x := 1 }
default { invalid() }
mstore(1, 1)
}
// ====
// step: fullSuite
// ----
// {
// {
// switch mload(0)
// case 0 { }
// case 1 { }
// default { invalid() }
// mstore(1, 1)
// }
// }