From d28f97e9da2d168406a2758a4b7cfd3d65f94159 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 9 Oct 2025 23:40:47 +0000 Subject: [PATCH] Remove YOSYS_USE_STICKY_IDS --- kernel/rtlil.cc | 4 ---- kernel/rtlil.h | 23 ----------------------- 2 files changed, 27 deletions(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 670b61afd..c6358729a 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -41,10 +41,6 @@ std::unordered_map RTLIL::IdString::global_id_index_; std::vector RTLIL::IdString::global_refcount_storage_; std::vector RTLIL::IdString::global_free_idx_list_; #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); #include "kernel/constids.inc" diff --git a/kernel/rtlil.h b/kernel/rtlil.h index fbf9292b3..556f936e9 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -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 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()); #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; }