mirror of
https://github.com/YosysHQ/yosys
synced 2025-12-04 19:16:48 +00:00
Remove YOSYS_NO_IDS_REFCNT
Refcounting is hardly used at all so this option is not that useful. We might want to have a different option that disables GC if that becomes a performance issue, but that should be a different option.
This commit is contained in:
parent
7f9de6e48f
commit
4c8b537d71
2 changed files with 0 additions and 15 deletions
|
|
@ -40,10 +40,8 @@ std::vector<RTLIL::IdString::Storage> RTLIL::IdString::global_id_storage_;
|
|||
std::unordered_map<std::string_view, int> RTLIL::IdString::global_id_index_;
|
||||
std::unordered_map<int, const std::string*> RTLIL::IdString::global_autoidx_id_prefix_storage_;
|
||||
std::unordered_map<int, char*> RTLIL::IdString::global_autoidx_id_storage_;
|
||||
#ifndef YOSYS_NO_IDS_REFCNT
|
||||
std::unordered_map<int, int> RTLIL::IdString::global_refcount_storage_;
|
||||
std::vector<int> RTLIL::IdString::global_free_idx_list_;
|
||||
#endif
|
||||
|
||||
static void populate(std::string_view name)
|
||||
{
|
||||
|
|
@ -104,7 +102,6 @@ int RTLIL::IdString::really_insert(std::string_view p, std::unordered_map<std::s
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef YOSYS_NO_IDS_REFCNT
|
||||
if (global_free_idx_list_.empty()) {
|
||||
log_assert(global_id_storage_.size() < 0x40000000);
|
||||
global_free_idx_list_.push_back(global_id_storage_.size());
|
||||
|
|
@ -113,10 +110,6 @@ int RTLIL::IdString::really_insert(std::string_view p, std::unordered_map<std::s
|
|||
|
||||
int idx = global_free_idx_list_.back();
|
||||
global_free_idx_list_.pop_back();
|
||||
#else
|
||||
int idx = global_id_storage_.size();
|
||||
global_id_index_[global_id_storage_.back()] = idx;
|
||||
#endif
|
||||
char* buf = static_cast<char*>(malloc(p.size() + 1));
|
||||
memcpy(buf, p.data(), p.size());
|
||||
buf[p.size()] = 0;
|
||||
|
|
@ -249,7 +242,6 @@ int RTLIL::OwningIdString::gc_count;
|
|||
void RTLIL::OwningIdString::collect_garbage()
|
||||
{
|
||||
int64_t start = PerformanceTimer::query();
|
||||
#ifndef YOSYS_NO_IDS_REFCNT
|
||||
IdStringCollector collector;
|
||||
for (auto &[idx, design] : *RTLIL::Design::get_all_designs()) {
|
||||
collector.trace(*design);
|
||||
|
|
@ -291,7 +283,6 @@ void RTLIL::OwningIdString::collect_garbage()
|
|||
}
|
||||
it = global_autoidx_id_prefix_storage_.erase(it);
|
||||
}
|
||||
#endif
|
||||
int64_t time_ns = PerformanceTimer::query() - start;
|
||||
Pass::subtract_from_current_runtime_ns(time_ns);
|
||||
gc_ns += time_ns;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue