From b29f04fb386da5546b4d4136dbf26150214a2164 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Mon, 13 Jul 2026 13:08:12 +0200 Subject: [PATCH] rtlil: sort twines by string, not by ID, in sort methods --- kernel/rtlil.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 0f49effd5..b405b8ef6 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1689,7 +1689,7 @@ void RTLIL::Design::rename(RTLIL::Module *module, TwineRef new_name) void RTLIL::Design::sort() { scratchpad.sort(); - modules_.sort(); + modules_.sort(sort_by_twine_str_expensive(twines)); for (auto &it : modules_) it.second->sort(); } @@ -1697,7 +1697,7 @@ void RTLIL::Design::sort() void RTLIL::Design::sort_modules() { scratchpad.sort(); - modules_.sort(); + modules_.sort(sort_by_twine_str_expensive(twines)); } void check_module(RTLIL::Module *module, ParallelDispatchThreadPool &thread_pool);