summaryrefslogtreecommitdiff
path: root/passes
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-09-21 15:13:44 +0200
committerClifford Wolf <clifford@clifford.at>2014-09-21 15:13:44 +0200
commitd6e2ace95be79274f8707a897e3ac265ab85b11a (patch)
tree4a57b9a9833b4dae3f6a32b005f0817a35fe83ed /passes
parentb28be0759f46326d4d2a7ac74f1d1f79477435da (diff)
Logic loop bugfix for "share" pass
Diffstat (limited to 'passes')
-rw-r--r--passes/opt/share.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/passes/opt/share.cc b/passes/opt/share.cc
index 5ed9af00..b91a67ee 100644
--- a/passes/opt/share.cc
+++ b/passes/opt/share.cc
@@ -958,13 +958,17 @@ struct ShareWorker
for (auto bit : topo_sigmap(all_ctrl_signals))
for (auto c : topo_bit_drivers[bit])
- topo_cell_drivers[cell].insert(c);
+ topo_cell_drivers[supercell].insert(c);
+
+ topo_cell_drivers[supercell].insert(topo_cell_drivers[cell].begin(), topo_cell_drivers[cell].end());
+ topo_cell_drivers[supercell].insert(topo_cell_drivers[other_cell].begin(), topo_cell_drivers[other_cell].end());
+
+ topo_cell_drivers[cell] = { supercell };
+ topo_cell_drivers[other_cell] = { supercell };
if (config.limit > 0)
config.limit--;
- topo_cell_drivers[cell].insert(topo_cell_drivers[other_cell].begin(), topo_cell_drivers[other_cell].end());
- topo_cell_drivers[other_cell] = topo_cell_drivers[cell];
break;
}
}