-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust Yul optimizer to rematerialize zero literals. #14225
Comments
The high-level task here is: We already have the However, after literal rematerialization we run the Common Subexpression Eliminator again, which will reverse this, i.e. which will replace multiple uses of a variable with the same constant value by multiple references to that constant.
in The easy fix for this issue is to generalize that logic to all occurrences of zero, in case the EVM version supports We should then check if any other optimizer steps suffer due to this, i.e. if the data flow analyzer, etc., keep working as intended with this change. I'd expect everything will be fine, but if we see unexpected gas cost increases or the optimizer fails to simplify anything, we'll need to dig into that. |
No description provided.
The text was updated successfully, but these errors were encountered: