3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-14 21:51:28 +00:00

Merge pull request #5340 from rocallahan/IdString-dead-code

When looking up the IdString table, it can never be empty after we've called prepopulate, so remove some dead code.
This commit is contained in:
Jannis Harder 2025-09-12 14:07:28 +02:00 committed by GitHub
commit 6d8dfb0750
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -230,11 +230,6 @@ struct RTLIL::IdString
#ifndef YOSYS_NO_IDS_REFCNT
if (global_free_idx_list_.empty()) {
if (global_id_storage_.empty()) {
global_refcount_storage_.push_back(0);
global_id_storage_.push_back((char*)"");
global_id_index_[global_id_storage_.back()] = 0;
}
log_assert(global_id_storage_.size() < 0x40000000);
global_free_idx_list_.push_back(global_id_storage_.size());
global_id_storage_.push_back(nullptr);
@ -247,10 +242,6 @@ struct RTLIL::IdString
global_id_index_[global_id_storage_.at(idx)] = idx;
global_refcount_storage_.at(idx)++;
#else
if (global_id_storage_.empty()) {
global_id_storage_.push_back((char*)"");
global_id_index_[global_id_storage_.back()] = 0;
}
int idx = global_id_storage_.size();
global_id_storage_.push_back(strdup(p));
global_id_index_[global_id_storage_.back()] = idx;