3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-07 01:32:15 +00:00

Merge pull request #5629 from rocallahan/remove-zero-wires

Avoid scanning entire module in `Module::remove()` if there are no wires to remove
This commit is contained in:
Emil J 2026-02-04 17:44:24 +01:00 committed by GitHub
commit 2aa0e1d009
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2990,6 +2990,8 @@ void RTLIL::Module::add(RTLIL::Binding *binding)
void RTLIL::Module::remove(const pool<RTLIL::Wire*> &wires)
{
log_assert(refcount_wires_ == 0);
if (wires.empty())
return;
struct DeleteWireWorker
{