From b83bc98d16440c430a2d1ccd04b34054e3bfe9aa Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Sat, 28 Sep 2024 11:02:51 -0400 Subject: [PATCH] fix[venom]: clean up sccp pass (#4261) small cleanup tasks for sccp pass. remove dead variables and stray comments. --- vyper/venom/passes/sccp/sccp.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/vyper/venom/passes/sccp/sccp.py b/vyper/venom/passes/sccp/sccp.py index cfac6794f8..013583ec63 100644 --- a/vyper/venom/passes/sccp/sccp.py +++ b/vyper/venom/passes/sccp/sccp.py @@ -59,15 +59,12 @@ class SCCP(IRPass): cfg_in_exec: dict[IRBasicBlock, OrderedSet[IRBasicBlock]] cfg_dirty: bool - # list of basic blocks whose cfg_in was modified - cfg_in_modified: OrderedSet[IRBasicBlock] def __init__(self, analyses_cache: IRAnalysesCache, function: IRFunction): super().__init__(analyses_cache, function) self.lattice = {} self.work_list: list[WorkListItem] = [] self.cfg_dirty = False - self.cfg_in_modified = OrderedSet() def run_pass(self): self.fn = self.function @@ -76,8 +73,6 @@ def run_pass(self): self._calculate_sccp(self.fn.entry) self._propagate_constants() - # self._propagate_variables() - if self.cfg_dirty: self.analyses_cache.force_analysis(CFGAnalysis) self._fix_phi_nodes() @@ -312,9 +307,6 @@ def _replace_constants(self, inst: IRInstruction): inst.operands = [target] self.cfg_dirty = True - for bb in inst.parent.cfg_out: - if bb.label == target: - self.cfg_in_modified.add(bb) elif inst.opcode in ("assert", "assert_unreachable"): lat = self._eval_from_lattice(inst.operands[0])