From 2fb4931e5be2c2a0c80ffbca73ad74ebb8c9032f Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Date: Tue, 14 Apr 2020 18:09:05 +0000 Subject: Add specialized `hash()` for type `dict` and use a `dict` instead of a `std::map` for `techmap_cache` and `techmap_do_cache`. --- passes/techmap/techmap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'passes/techmap') diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index bd7cc14a9..9779ecae9 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -63,8 +63,8 @@ void apply_prefix(IdString prefix, RTLIL::SigSpec &sig, RTLIL::Module *module) struct TechmapWorker { dict simplemap_mappers; - std::map>, RTLIL::Module*> techmap_cache; - std::map techmap_do_cache; + dict>, RTLIL::Module*> techmap_cache; + dict techmap_do_cache; std::set> module_queue; dict sigmaps; @@ -568,7 +568,7 @@ struct TechmapWorker { IdString derived_name = tpl_name; RTLIL::Module *tpl = map->module(tpl_name); - std::map parameters(cell->parameters.begin(), cell->parameters.end()); + dict parameters(cell->parameters.begin(), cell->parameters.end()); if (tpl->get_blackbox_attribute(ignore_wb)) continue; @@ -778,7 +778,7 @@ struct TechmapWorker use_wrapper_tpl:; // do not register techmap_wrap modules with techmap_cache } else { - std::pair> key(tpl_name, parameters); + std::pair> key(tpl_name, parameters); if (techmap_cache.count(key) > 0) { tpl = techmap_cache[key]; } else { -- cgit v1.2.3