mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 14:23:41 +00:00
Keep shorter name for opt_merge always
This commit is contained in:
parent
3da6e3f060
commit
5e364599be
1 changed files with 4 additions and 0 deletions
|
@ -279,6 +279,10 @@ struct OptMergeWorker
|
||||||
auto r = sharemap.insert(std::make_pair(hash, cell));
|
auto r = sharemap.insert(std::make_pair(hash, cell));
|
||||||
if (!r.second) {
|
if (!r.second) {
|
||||||
if (compare_cell_parameters_and_connections(cell, r.first->second)) {
|
if (compare_cell_parameters_and_connections(cell, r.first->second)) {
|
||||||
|
// SILIMATE: Keep the shorter name always
|
||||||
|
if (cell->name.str() < r.first->second->name.str())
|
||||||
|
std::swap(r.first->second, cell);
|
||||||
|
|
||||||
if (cell->has_keep_attr()) {
|
if (cell->has_keep_attr()) {
|
||||||
if (r.first->second->has_keep_attr())
|
if (r.first->second->has_keep_attr())
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue