Redundant store eliminator.

This commit is contained in:
chriseth
2021-04-26 18:21:18 +02:00
parent 2969bc0f3e
commit 5f7751f22c
11 changed files with 144 additions and 104 deletions
+1 -97
View File
@@ -6,20 +6,6 @@ object "object" {
code {
{
let _1 := 1
sstore(_1, _1)
sstore(2, _1)
sstore(3, _1)
sstore(4, _1)
sstore(5, _1)
sstore(6, _1)
sstore(7, _1)
sstore(8, _1)
sstore(9, _1)
sstore(10, _1)
sstore(11, _1)
sstore(12, _1)
sstore(13, _1)
sstore(_1, _1)
sstore(2, _1)
sstore(3, _1)
sstore(4, _1)
@@ -39,93 +25,11 @@ object "object" {
Binary representation:
6001808155806002558060035580600455806005558060065580600755806008558060095580600a5580600b5580600c5580600d55808155806002558060035580600455806005558060065580600755806008558060095580600a5580600b5580600c5580600d5580815550
6001806002558060035580600455806005558060065580600755806008558060095580600a5580600b5580600c5580600d5580815550
Text representation:
/* "yul_stack_opt/input.yul":98:99 */
0x01
dup1
dup2
/* "yul_stack_opt/input.yul":129:141 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":151:160 */
0x02
/* "yul_stack_opt/input.yul":144:164 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":174:183 */
0x03
/* "yul_stack_opt/input.yul":167:187 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":197:206 */
0x04
/* "yul_stack_opt/input.yul":190:210 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":220:229 */
0x05
/* "yul_stack_opt/input.yul":213:233 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":243:252 */
0x06
/* "yul_stack_opt/input.yul":236:256 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":266:275 */
0x07
/* "yul_stack_opt/input.yul":259:279 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":289:298 */
0x08
/* "yul_stack_opt/input.yul":282:302 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":312:321 */
0x09
/* "yul_stack_opt/input.yul":305:325 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":335:344 */
0x0a
/* "yul_stack_opt/input.yul":328:348 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":358:368 */
0x0b
/* "yul_stack_opt/input.yul":351:372 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":382:392 */
0x0c
/* "yul_stack_opt/input.yul":375:396 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":406:416 */
0x0d
/* "yul_stack_opt/input.yul":399:420 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
dup2
/* "yul_stack_opt/input.yul":129:141 */
sstore
/* "yul_stack_opt/input.yul":98:99 */
dup1
/* "yul_stack_opt/input.yul":151:160 */
0x02