From d6e2ace95be79274f8707a897e3ac265ab85b11a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 21 Sep 2014 15:13:44 +0200 Subject: [PATCH] Logic loop bugfix for "share" pass --- passes/opt/share.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/passes/opt/share.cc b/passes/opt/share.cc index 5ed9af009..b91a67ee0 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; } } -- 2.30.2