You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, EVMSingleUseExpression pass is doing rematerialization of 2 instructions (CALLDATA + PUSH) to reduce stack pressure. This is not always profitable, since we could generate 1 stack manipulation instruction instead, like in the tests/solidity/simple/yul_instructions/keccak256.sol test:
Loop without rematerialization:
.BB0_8: ; %for_body
; =>This Inner Loop Header: Depth=1
JUMPDEST
DUP3 <- No remat
DUP6 <- No remat
DUP3
ADD
MSTORE8
ADD
DUP3 <- No remat
DUP2
LT
PUSH4 @.BB0_17
JUMPI
Move 2 instruction rematerialization to stackification algorithm, since it should be possible to determine whether to do rematerialization or to reuse value from the stack.
The text was updated successfully, but these errors were encountered:
In some cases,
EVMSingleUseExpression
pass is doing rematerialization of 2 instructions (CALLDATA + PUSH
) to reduce stack pressure. This is not always profitable, since we could generate 1 stack manipulation instruction instead, like in thetests/solidity/simple/yul_instructions/keccak256.sol
test:Move 2 instruction rematerialization to stackification algorithm, since it should be possible to determine whether to do rematerialization or to reuse value from the stack.
The text was updated successfully, but these errors were encountered: