Merge pull request #6840 from ethereum/discoverMSize

Only remove msize-modifying instructions if msize is not used.
This commit is contained in:
chriseth
2019-05-28 13:16:55 +02:00
committed by GitHub
26 changed files with 311 additions and 84 deletions
@@ -0,0 +1,12 @@
{
let a := 1
let b := keccak256(1, 1)
sstore(0, msize())
}
// ====
// step: unusedPruner
// ----
// {
// pop(keccak256(1, 1))
// sstore(0, msize())
// }
@@ -0,0 +1,12 @@
{
let a := 1
let b := mload(10)
sstore(0, msize())
}
// ====
// step: unusedPruner
// ----
// {
// pop(mload(10))
// sstore(0, msize())
// }
@@ -0,0 +1,9 @@
{
let a := 1
let b := mload(10)
sstore(0, 5)
}
// ====
// step: unusedPruner
// ----
// { sstore(0, 5) }