mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-10-06 01:53:53 +02:00
twine: GC selection_stack
This commit is contained in:
+9
-2
@@ -794,8 +794,7 @@ size_t RTLIL::Design::gc_twines()
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &[name, sel] : selection_vars) {
|
||||
root(name);
|
||||
auto root_selection = [&](const RTLIL::Selection &sel) {
|
||||
for (IdString m : sel.selected_modules)
|
||||
root(m);
|
||||
for (auto &[m, members] : sel.selected_members) {
|
||||
@@ -803,8 +802,16 @@ size_t RTLIL::Design::gc_twines()
|
||||
for (IdString member : members)
|
||||
root(member);
|
||||
}
|
||||
};
|
||||
|
||||
for (auto &[name, sel] : selection_vars) {
|
||||
root(name);
|
||||
root_selection(sel);
|
||||
}
|
||||
|
||||
for (auto &sel : selection_stack)
|
||||
root_selection(sel);
|
||||
|
||||
size_t erased = twines.gc(live);
|
||||
|
||||
int64_t time_ns = PerformanceTimer::query() - start;
|
||||
|
||||
Reference in New Issue
Block a user