mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 06:07:26 +02: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:
@@ -2990,6 +2990,8 @@ void RTLIL::Module::add(RTLIL::Binding *binding)
|
|||||||
void RTLIL::Module::remove(const pool<RTLIL::Wire*> &wires)
|
void RTLIL::Module::remove(const pool<RTLIL::Wire*> &wires)
|
||||||
{
|
{
|
||||||
log_assert(refcount_wires_ == 0);
|
log_assert(refcount_wires_ == 0);
|
||||||
|
if (wires.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
struct DeleteWireWorker
|
struct DeleteWireWorker
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user