From c7098e4aee721090d38522b28d7e0580fb10e96c Mon Sep 17 00:00:00 2001 From: Rihi <19492038+rihi@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:28:19 +0200 Subject: [PATCH] Remove dead code in type propagation (#414) --- decompiler/pipeline/dataflowanalysis/type_propagation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/decompiler/pipeline/dataflowanalysis/type_propagation.py b/decompiler/pipeline/dataflowanalysis/type_propagation.py index d234cb01c..2d093bf14 100644 --- a/decompiler/pipeline/dataflowanalysis/type_propagation.py +++ b/decompiler/pipeline/dataflowanalysis/type_propagation.py @@ -2,11 +2,11 @@ from __future__ import annotations -from collections import Counter, defaultdict +from collections import Counter from enum import Enum from itertools import chain from logging import info -from typing import DefaultDict, Iterator, List, Set, Tuple +from typing import Iterator, List, Tuple from decompiler.pipeline.stage import PipelineStage from decompiler.structures.graphs.cfg import ControlFlowGraph @@ -29,7 +29,6 @@ class EdgeType(Enum): def __init__(self, **attr): """Generate a new TypeGraph, appending a dict for usage tracking.""" super().__init__(**attr) - self._usages: DefaultDict[Expression, Set] = defaultdict(set) @classmethod def from_cfg(cls, cfg: ControlFlowGraph) -> TypeGraph: @@ -57,7 +56,6 @@ def add_expression(self, expression: Expression, parent: Instruction): while todo: head = todo.pop() self.add_node(self._make_node(head), **{str(id(head)): head}) - self._usages[self._make_node(head)].add(parent) children = list(head) todo.extend(children) for sub_expression in children: