3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-23 06:01:27 +00:00

Remove YOSYS_USE_STICKY_IDS

This commit is contained in:
Robert O'Callahan 2025-10-09 23:40:47 +00:00 committed by Emil J. Tywoniak
parent 0fe79ce01b
commit d28f97e9da
2 changed files with 0 additions and 27 deletions

View file

@ -145,7 +145,6 @@ struct RTLIL::IdString
#undef YOSYS_XTRACE_GET_PUT
#undef YOSYS_SORT_ID_FREE_LIST
#undef YOSYS_USE_STICKY_IDS
#undef YOSYS_NO_IDS_REFCNT
// the global id string cache
@ -169,11 +168,6 @@ struct RTLIL::IdString
static std::vector<int> global_free_idx_list_;
#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()
{
#ifdef YOSYS_XTRACE_GET_PUT
@ -189,14 +183,6 @@ struct RTLIL::IdString
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
std::sort(global_free_idx_list_.begin(), global_free_idx_list_.end(), std::greater<int>());
#endif
@ -273,15 +259,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));
#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;
}