Make hardcoded parts of the optimizer sequence configurable

This commit is contained in:
Nikola Matic
2022-09-12 10:57:36 +02:00
parent f808855329
commit f6f0d6a360
55 changed files with 461 additions and 6 deletions
@@ -0,0 +1 @@
--ir-optimized --optimize --yul-optimizations :iDu
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
pragma abicoder v2;
contract C {
constructor() payable {
assembly ("memory-safe") {
let a := 0
revert(0, a)
}
}
}
@@ -0,0 +1,24 @@
Optimized IR:
/// @use-src 0:"yul_optimizer_steps_with_empty_optimization_sequence/input.sol"
object "C_8" {
code {
{
/// @src 0:80:221 "contract C {..."
mstore(64, memoryguard(0x80))
/// @src 0:129:213 "assembly (\"memory-safe\") {..."
let usr$a := 0
revert(0, usr$a)
}
}
/// @use-src 0:"yul_optimizer_steps_with_empty_optimization_sequence/input.sol"
object "C_8_deployed" {
code {
{
/// @src 0:80:221 "contract C {..."
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
data ".metadata" hex"<BYTECODE REMOVED>"
}
}