-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
feat[venom]: mark loads as non-volatile #4388
base: master
Are you sure you want to change the base?
feat[venom]: mark loads as non-volatile #4388
Conversation
this commit marks load instructions (`mload`, `sload`, etc) as non-volatile, allowing them to be removed in the `remove_unused_variables` pass.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4388 +/- ##
==========================================
- Coverage 91.98% 91.89% -0.09%
==========================================
Files 119 120 +1
Lines 16686 16732 +46
Branches 2808 2814 +6
==========================================
+ Hits 15348 15376 +28
- Misses 919 936 +17
- Partials 419 420 +1 ☔ View full report in Codecov by Sentry. |
@HodanPlodky pointed out offline -- there could be an |
for idx, inst in enumerate(bb.instructions): | ||
self.instruction_index[inst] = idx | ||
if inst.opcode == "msize" and bb not in self.reads_msize: | ||
self.reads_msize[bb] = idx |
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.
Should not this store last msize
in basic block instead of first msize
. This could be the problem in case which is showed in PR charles-cooper#53
Co-authored-by: HodanPlodky <[email protected]>
i investigated refactoring (or at least trimming down) VOLATILE_INSTRUCTIONS and replacing it with essentially checking if the instruction is a terminator instruction or has write effects. however, it was not that clean since we still need to special-case MSIZE. another approach which simplifies the code here would be to have a special volatile instruction like |
simplify some code. remove a dead comment
What I did
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture