From 86699b42f619960bfefd4d0b479dd44a90527ea4 Mon Sep 17 00:00:00 2001 From: gatecat Date: Sat, 26 Feb 2022 15:17:46 +0000 Subject: Switch to potentially-sparse net users array This uses a new data structure for net.users that allows gaps, so removing a port from a net is no longer an O(n) operation on the number of users the net has. Signed-off-by: gatecat --- frontend/frontend_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend') diff --git a/frontend/frontend_base.h b/frontend/frontend_base.h index 8ac61bbe..a2ac219c 100644 --- a/frontend/frontend_base.h +++ b/frontend/frontend_base.h @@ -690,7 +690,7 @@ template struct GenericFrontend // Combine users for (auto &usr : mergee->users) { usr.cell->ports[usr.port].net = base; - base->users.push_back(usr); + usr.cell->ports[usr.port].user_idx = base->users.add(usr); } // Point aliases to the new net for (IdString alias : mergee->aliases) { -- cgit v1.2.3