aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/shregmap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'passes/techmap/shregmap.cc')
-rw-r--r--passes/techmap/shregmap.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc
index 46f6a79fb..21dfe9619 100644
--- a/passes/techmap/shregmap.cc
+++ b/passes/techmap/shregmap.cc
@@ -293,13 +293,10 @@ struct ShregmapWorker
if (opts.init || sigbit_init.count(q_bit) == 0)
{
- auto r = sigbit_chain_next.insert(std::make_pair(d_bit, cell));
- if (!r.second) {
+ if (sigbit_chain_next.count(d_bit)) {
sigbit_with_non_chain_users.insert(d_bit);
- Wire *wire = module->addWire(NEW_ID);
- module->connect(wire, d_bit);
- sigbit_chain_next.insert(std::make_pair(wire, cell));
- }
+ } else
+ sigbit_chain_next[d_bit] = cell;
sigbit_chain_prev[q_bit] = cell;
continue;