From: Jacob Lifshay Date: Tue, 10 Jan 2023 12:55:58 +0000 (-0800) Subject: remove unused code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cacf3a5c82a6e96458c3ae5761c41973ad6b03c2;p=bigint-presentation-code.git remove unused code --- diff --git a/src/bigint_presentation_code/compiler_ir.py b/src/bigint_presentation_code/compiler_ir.py index 7dd5aac..4576270 100644 --- a/src/bigint_presentation_code/compiler_ir.py +++ b/src/bigint_presentation_code/compiler_ir.py @@ -872,37 +872,6 @@ class LocSet(OFSet[Loc], Interned): return None return self.ty.base_ty - def concat(self, *others): - # type: (*LocSet) -> LocSet - if self.ty is None: - return LocSet() - base_ty = self.ty.base_ty - reg_len = self.ty.reg_len - starts = {k: BitSet(v) for k, v in self.starts.items()} - for other in others: - if other.ty is None: - return LocSet() - if other.ty.base_ty != base_ty: - return LocSet() - for kind, other_starts in other.starts.items(): - if kind not in starts: - continue - starts[kind].bits &= other_starts.bits >> reg_len - if starts[kind] == 0: - del starts[kind] - if len(starts) == 0: - return LocSet() - reg_len += other.ty.reg_len - - def locs(): - # type: () -> Iterable[Loc] - for kind, v in starts.items(): - for start in v: - loc = Loc.try_make(kind=kind, start=start, reg_len=reg_len) - if loc is not None: - yield loc - return LocSet(locs()) - @lru_cache(maxsize=None, typed=True) def max_conflicts_with(self, other): # type: (LocSet | Loc) -> int @@ -2086,10 +2055,6 @@ class OpInputSeq(Sequence[_T], Generic[_T, _Desc]): self._verify_write_with_desc(idx, item, desc) return idx - def _on_set(self, idx, new_item, old_item): - # type: (int, _T, _T | None) -> None - pass - @abstractmethod def _get_descriptors(self): # type: () -> tuple[_Desc, ...] @@ -2169,10 +2134,6 @@ class OpInputVals(OpInputSeq[SSAVal, OperandDesc]): raise ValueError(f"assigned item's type {item.ty!r} doesn't match " f"corresponding input's type {desc.ty!r}") - def _on_set(self, idx, new_item, old_item): - # type: (int, SSAVal, SSAVal | None) -> None - SSAUses._on_op_input_set(self, idx, new_item, old_item) # type: ignore - def __init__(self, items, op): # type: (Iterable[SSAVal], Op) -> None if hasattr(op, "inputs"):