Skip to content

Commit

Permalink
fix[venom]: fix unused variables pass (#4259)
Browse files Browse the repository at this point in the history
it corrupts the DFG. to see the bug before this commit, add another
`StoreEliminationPass` after `RemoveUnusedVariablesPass`.

this commit invalidates the DFG after removing unused variables.
  • Loading branch information
charles-cooper authored Oct 13, 2024
1 parent fc9a220 commit 6606ded
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vyper/venom/passes/remove_unused_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def run_pass(self):
self._process_instruction(inst)

self.analyses_cache.invalidate_analysis(LivenessAnalysis)
self.analyses_cache.invalidate_analysis(DFGAnalysis)

def _process_instruction(self, inst):
if inst.output is None:
Expand Down

0 comments on commit 6606ded

Please sign in to comment.