3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Keep shorter name for opt_merge always

This commit is contained in:
Akash Levy 2024-11-11 17:07:41 -08:00
parent 3da6e3f060
commit 5e364599be

View file

@ -279,6 +279,10 @@ struct OptMergeWorker
auto r = sharemap.insert(std::make_pair(hash, cell));
if (!r.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 (r.first->second->has_keep_attr())
continue;