-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
refactor[venom]: use InstUpdater
in more passes
#4508
base: master
Are you sure you want to change the base?
refactor[venom]: use InstUpdater
in more passes
#4508
Conversation
InstUpdater
everywhereInstUpdater
in more passes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4508 +/- ##
==========================================
- Coverage 92.16% 92.15% -0.02%
==========================================
Files 122 122
Lines 17471 17467 -4
Branches 2959 2957 -2
==========================================
- Hits 16103 16097 -6
- Misses 957 958 +1
- Partials 411 412 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -14,6 +14,7 @@ class RemoveUnusedVariablesPass(IRPass): | |||
|
|||
def run_pass(self): | |||
self.dfg = self.analyses_cache.request_analysis(DFGAnalysis) | |||
self.updater = InstUpdater |
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 consume the dfg/call constructor?
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.
hm, looks like it's not actually used
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.
@@ -1,7 +1,7 @@ | |||
from vyper.utils import OrderedSet, uniq | |||
from vyper.venom.analysis import DFGAnalysis, LivenessAnalysis | |||
from vyper.venom.basicblock import IRInstruction | |||
from vyper.venom.passes.base_pass import IRPass | |||
from vyper.venom.passes.base_pass import InstUpdater, IRPass |
Check notice
Code scanning / CodeQL
Unused import Note
What I did
it's safer and faster for passes which modify the dfg to modify it in place using InstUpdater
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture