twines: only GC the active design

This commit is contained in:
Emil J. Tywoniak
2026-10-02 18:42:02 +02:00
parent 7bf2352473
commit 9e00bd6421
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ void try_collect_garbage()
if (!GarbageCollectionGuard::is_enabled() || !garbage_collection_requested)
return;
garbage_collection_requested = false;
for (auto &[idx, design] : *RTLIL::Design::get_all_designs())
design->gc_twines();
if (yosys_design)
yosys_design->gc_twines();
}
Pass::Pass(std::string name, std::string short_help, source_location location) :
+1 -1
View File
@@ -46,7 +46,7 @@ public:
// Call from anywhere to request GC at the next safe point.
void request_garbage_collection();
// GC if GarbageCollectionGuard::is_enabled() and GC was requested.
// GC the active design if GarbageCollectionGuard::is_enabled() and GC was requested.
void try_collect_garbage();
struct Pass