mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 13:56:04 +00:00
Remove YOSYS_USE_STICKY_IDS
This commit is contained in:
parent
8b8939e219
commit
2ca7b2f7d7
2 changed files with 0 additions and 27 deletions
|
|
@ -41,10 +41,6 @@ std::unordered_map<std::string_view, int> RTLIL::IdString::global_id_index_;
|
||||||
std::vector<uint32_t> RTLIL::IdString::global_refcount_storage_;
|
std::vector<uint32_t> RTLIL::IdString::global_refcount_storage_;
|
||||||
std::vector<int> RTLIL::IdString::global_free_idx_list_;
|
std::vector<int> RTLIL::IdString::global_free_idx_list_;
|
||||||
#endif
|
#endif
|
||||||
#ifdef YOSYS_USE_STICKY_IDS
|
|
||||||
int RTLIL::IdString::last_created_idx_[8];
|
|
||||||
int RTLIL::IdString::last_created_idx_ptr_;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define X(_id) const RTLIL::IdString RTLIL::IDInternal::_id(RTLIL::StaticId::_id);
|
#define X(_id) const RTLIL::IdString RTLIL::IDInternal::_id(RTLIL::StaticId::_id);
|
||||||
#include "kernel/constids.inc"
|
#include "kernel/constids.inc"
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ struct RTLIL::IdString
|
||||||
|
|
||||||
#undef YOSYS_XTRACE_GET_PUT
|
#undef YOSYS_XTRACE_GET_PUT
|
||||||
#undef YOSYS_SORT_ID_FREE_LIST
|
#undef YOSYS_SORT_ID_FREE_LIST
|
||||||
#undef YOSYS_USE_STICKY_IDS
|
|
||||||
#undef YOSYS_NO_IDS_REFCNT
|
#undef YOSYS_NO_IDS_REFCNT
|
||||||
|
|
||||||
// the global id string cache
|
// the global id string cache
|
||||||
|
|
@ -168,11 +167,6 @@ struct RTLIL::IdString
|
||||||
static std::vector<int> global_free_idx_list_;
|
static std::vector<int> global_free_idx_list_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef YOSYS_USE_STICKY_IDS
|
|
||||||
static int last_created_idx_ptr_;
|
|
||||||
static int last_created_idx_[8];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void xtrace_db_dump()
|
static inline void xtrace_db_dump()
|
||||||
{
|
{
|
||||||
#ifdef YOSYS_XTRACE_GET_PUT
|
#ifdef YOSYS_XTRACE_GET_PUT
|
||||||
|
|
@ -188,14 +182,6 @@ struct RTLIL::IdString
|
||||||
|
|
||||||
static inline void checkpoint()
|
static inline void checkpoint()
|
||||||
{
|
{
|
||||||
#ifdef YOSYS_USE_STICKY_IDS
|
|
||||||
last_created_idx_ptr_ = 0;
|
|
||||||
for (int i = 0; i < 8; i++) {
|
|
||||||
if (last_created_idx_[i])
|
|
||||||
put_reference(last_created_idx_[i]);
|
|
||||||
last_created_idx_[i] = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef YOSYS_SORT_ID_FREE_LIST
|
#ifdef YOSYS_SORT_ID_FREE_LIST
|
||||||
std::sort(global_free_idx_list_.begin(), global_free_idx_list_.end(), std::greater<int>());
|
std::sort(global_free_idx_list_.begin(), global_free_idx_list_.end(), std::greater<int>());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -272,15 +258,6 @@ struct RTLIL::IdString
|
||||||
log("#X# GET-BY-NAME '%s' (index %d, refcount %u)\n", global_id_storage_.at(idx).buf, idx, global_refcount_storage_.at(idx));
|
log("#X# GET-BY-NAME '%s' (index %d, refcount %u)\n", global_id_storage_.at(idx).buf, idx, global_refcount_storage_.at(idx));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef YOSYS_USE_STICKY_IDS
|
|
||||||
// Avoid Create->Delete->Create pattern
|
|
||||||
if (last_created_idx_[last_created_idx_ptr_])
|
|
||||||
put_reference(last_created_idx_[last_created_idx_ptr_]);
|
|
||||||
last_created_idx_[last_created_idx_ptr_] = idx;
|
|
||||||
get_reference(last_created_idx_[last_created_idx_ptr_]);
|
|
||||||
last_created_idx_ptr_ = (last_created_idx_ptr_ + 1) & 7;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue