Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code in type propagation #414

Merged
merged 3 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions decompiler/pipeline/dataflowanalysis/type_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Loading