From f18f46cc9bc06c62a42930cea51efa0391ea9f77 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Fri, 29 May 2026 22:27:07 +0200 Subject: [PATCH] patch: don't gc signorm cells --- kernel/unstable/patch.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/unstable/patch.cc b/kernel/unstable/patch.cc index 61c25b0df..ba06a470e 100644 --- a/kernel/unstable/patch.cc +++ b/kernel/unstable/patch.cc @@ -90,7 +90,9 @@ struct SrcCollector { void Patch::gc(Cell* old_cell) { log_debug("gc %s\n", old_cell->name); - std::vector inputs = {}; + if (old_cell->type.in(ID($input_port), ID($output_port), ID($public))) + return; + pool inputs; for (auto [port_name, sig] : old_cell->connections()) { auto dir = old_cell->port_dir(port_name); log_assert(dir != PD_UNKNOWN); @@ -112,7 +114,7 @@ void Patch::gc(Cell* old_cell) { log_assert(in_wire); log_debug("\twire %s\n", in_wire->name); if (in_wire->known_driver() && !leaves.count(in_wire)) - inputs.push_back(in_wire->driverCell()); + inputs.insert(in_wire->driverCell()); } } }