Merge pull request #7804 from ethereum/morePrune

Tune the suite.
This commit is contained in:
chriseth 2019-11-27 13:43:24 +01:00 committed by GitHub
commit 87943bf444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
// }
// }