From 6f77fa80eaa033534f85ec288217d8522cb3e763 Mon Sep 17 00:00:00 2001 From: Harry Kalogirou Date: Fri, 27 Sep 2024 15:14:47 +0300 Subject: [PATCH] lint --- vyper/venom/passes/dft.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vyper/venom/passes/dft.py b/vyper/venom/passes/dft.py index 1e02eacf57..701ceeb3ff 100644 --- a/vyper/venom/passes/dft.py +++ b/vyper/venom/passes/dft.py @@ -1,6 +1,5 @@ import random from dataclasses import dataclass -import sys from vyper.utils import OrderedSet from vyper.venom.analysis.analysis import IRAnalysesCache @@ -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) @@ -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 @@ -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}") - + groups_visited.add(exit_group) for g in sorted_groups: if len(g.dependents) == 0: