mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-20 06:05:50 +00:00
Merge branch 'YosysHQ:main' into main
This commit is contained in:
commit
55cd50f1a6
10 changed files with 44 additions and 39 deletions
|
|
@ -132,7 +132,7 @@ int RTLIL::IdString::really_insert(std::string_view p, std::unordered_map<std::s
|
|||
|
||||
#ifdef YOSYS_XTRACE_GET_PUT
|
||||
if (yosys_xtrace)
|
||||
log("#X# GET-BY-NAME '%s' (index %d, refcount %u)\n", global_id_storage_.at(idx), idx, refcount(idx));
|
||||
log("#X# GET-BY-NAME '%s' (index %d, refcount %u)\n", global_id_storage_.at(idx).buf, idx, refcount(idx));
|
||||
#endif
|
||||
return idx;
|
||||
}
|
||||
|
|
@ -248,14 +248,15 @@ struct IdStringCollector {
|
|||
int64_t RTLIL::OwningIdString::gc_ns;
|
||||
int RTLIL::OwningIdString::gc_count;
|
||||
|
||||
void RTLIL::OwningIdString::collect_garbage()
|
||||
void RTLIL::OwningIdString::collect_garbage(bool trace)
|
||||
{
|
||||
int64_t start = PerformanceTimer::query();
|
||||
#ifndef YOSYS_NO_IDS_REFCNT
|
||||
IdStringCollector collector;
|
||||
for (auto &[idx, design] : *RTLIL::Design::get_all_designs()) {
|
||||
collector.trace(*design);
|
||||
}
|
||||
if (trace)
|
||||
for (auto &[idx, design] : *RTLIL::Design::get_all_designs()) {
|
||||
collector.trace(*design);
|
||||
}
|
||||
int size = GetSize(global_id_storage_);
|
||||
for (int i = static_cast<int>(StaticId::STATIC_ID_END); i < size; ++i) {
|
||||
RTLIL::IdString::Storage &storage = global_id_storage_.at(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue