Move the second run of YulOptimizer to IRGenerator to make it more obvious we're running it twice

This commit is contained in:
Kamil Śliwak
2023-04-29 00:20:12 +02:00
parent 0cb279494a
commit 4296197d8e
6 changed files with 371 additions and 27 deletions
@@ -31,7 +31,7 @@ contract C {
// compileViaYul: true
// ----
// test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29
// gas irOptimized: 304768
// gas irOptimized: 304765
// test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13
// gas irOptimized: 116476
// test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13
@@ -18,7 +18,7 @@ contract c {
}
// ----
// test() -> 38, 28, 18
// gas irOptimized: 148520
// gas irOptimized: 148525
// gas legacy: 151594
// gas legacyOptimized: 142655
// storageEmpty -> 1