-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Prune unreferenced functions from CFG #15592
Conversation
Thank you for your contribution to the Solidity compiler! A team member will follow up shortly. If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother. If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix. |
6cc1dbc
to
ac7f083
Compare
ff68922
to
46271a3
Compare
// EVMVersion: >=shanghai | ||
// bytecodeFormat: >=EOFv1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// EVMVersion: >=shanghai | |
// bytecodeFormat: >=EOFv1 | |
// bytecodeFormat: >=EOFv1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have it also in prune_unreferenced_function.yul
.
a9735cc
to
a511f6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally ok, but needs small tweaks before we can merge.
test/libyul/objectCompiler/eof/prune_unreferenced_function_non_returning.yul
Outdated
Show resolved
Hide resolved
a511f6b
to
46111bc
Compare
46111bc
to
9752443
Compare
9752443
to
bbb6a11
Compare
Motivation:
EOF does not allow unreferenced code sections in the container. Pruning them on Assembly level requires building a control flow graph and analyzing block exit type to discover non-returning functions. It's more convenient to do it already on CFG building step.