Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harkal committed Sep 27, 2024
1 parent 3d26886 commit 6f77fa8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vyper/venom/passes/dft.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import random
from dataclasses import dataclass
import sys

from vyper.utils import OrderedSet
from vyper.venom.analysis.analysis import IRAnalysesCache
Expand Down Expand Up @@ -31,6 +30,7 @@ def __init__(self, group_id: int, root: IRInstruction, volatile: bool):
self.root = root
self.volatile = volatile
self.instruction_count = 1

def __hash__(self) -> int:
return hash(self.group_id)

Expand Down Expand Up @@ -59,9 +59,6 @@ def _process_instruction_r(self, instructions: list[IRInstruction], inst: IRInst
children = [self.dfg.get_producing_instruction(op) for op in inst.get_input_variables()]
children = list(OrderedSet(children + self.ida[inst]))

# if inst.opcode == "sstore" and inst.operands[1].name == "%264" and inst.operands[0].name == "%267":
# children = reversed(children)

for dep_inst in children:
if inst.parent != dep_inst.parent:
continue
Expand Down Expand Up @@ -114,7 +111,7 @@ def _walk_group_r(group: Group):
# print("sorted:")
# for g in sorted_groups:
# print(f"{g.group_id}: {len(g.dependents)} {g.instruction_count}")

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

groups_visited.add(exit_group)
for g in sorted_groups:
if len(g.dependents) == 0:
Expand Down

0 comments on commit 6f77fa8

Please sign in to comment.