Using dict<> and pool<> in alumacc pass
authorClifford Wolf <clifford@clifford.at>
Mon, 31 Aug 2015 14:26:01 +0000 (16:26 +0200)
committerClifford Wolf <clifford@clifford.at>
Mon, 31 Aug 2015 14:26:01 +0000 (16:26 +0200)
passes/techmap/alumacc.cc

index 54c9bc1aaf5ca5e174a1cd6726c8737820e402c1..90563c863738e0abd64488cc7c92dde3018d48e5 100644 (file)
@@ -98,9 +98,9 @@ struct AlumaccWorker
                }
        };
 
-       std::map<RTLIL::SigBit, int> bit_users;
-       std::map<RTLIL::SigSpec, maccnode_t*> sig_macc;
-       std::map<RTLIL::SigSig, std::set<alunode_t*>> sig_alu;
+       dict<RTLIL::SigBit, int> bit_users;
+       dict<RTLIL::SigSpec, maccnode_t*> sig_macc;
+       dict<RTLIL::SigSig, pool<alunode_t*, hash_ptr_ops>> sig_alu;
        int macc_counter, alu_counter;
 
        AlumaccWorker(RTLIL::Module *module) : module(module), sigmap(module)
@@ -215,7 +215,7 @@ struct AlumaccWorker
        {
                while (1)
                {
-                       std::set<maccnode_t*> delete_nodes;
+                       pool<maccnode_t*, hash_ptr_ops> delete_nodes;
 
                        for (auto &it : sig_macc)
                        {
@@ -267,7 +267,7 @@ struct AlumaccWorker
 
        void macc_to_alu()
        {
-               std::set<maccnode_t*> delete_nodes;
+               pool<maccnode_t*, hash_ptr_ops> delete_nodes;
 
                for (auto &it : sig_macc)
                {