diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-12-26 21:35:22 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-12-26 21:35:22 +0100 |
commit | 9e6fb0b02ccf209528ead026de8eef0a8a0d7740 (patch) | |
tree | f3e7c1c9babc232a806b92a625bc447b1b75c7c4 /kernel/rtlil.cc | |
parent | e52d1f9b9a7f71634d4e8e8228060f792fa20dec (diff) | |
download | yosys-9e6fb0b02ccf209528ead026de8eef0a8a0d7740.tar.gz yosys-9e6fb0b02ccf209528ead026de8eef0a8a0d7740.tar.bz2 yosys-9e6fb0b02ccf209528ead026de8eef0a8a0d7740.zip |
Replaced std::unordered_map as implementation for Yosys::dict
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 28fdeecdd..05160b869 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -30,7 +30,7 @@ YOSYS_NAMESPACE_BEGIN RTLIL::IdString::destruct_guard_t RTLIL::IdString::destruct_guard; std::vector<int> RTLIL::IdString::global_refcount_storage_; std::vector<char*> RTLIL::IdString::global_id_storage_; -dict<char*, int, RTLIL::IdString::char_ptr_hash, RTLIL::IdString::char_ptr_eq> RTLIL::IdString::global_id_index_; +dict<char*, int, RTLIL::IdString::char_ptr_ops> RTLIL::IdString::global_id_index_; std::vector<int> RTLIL::IdString::global_free_idx_list_; RTLIL::Const::Const() @@ -242,7 +242,7 @@ RTLIL::Design::Design() RTLIL::Design::~Design() { - for (auto it = modules_.begin(); it != modules_.end(); it++) + for (auto it = modules_.begin(); it != modules_.end(); ++it) delete it->second; } @@ -454,13 +454,13 @@ RTLIL::Module::Module() RTLIL::Module::~Module() { - for (auto it = wires_.begin(); it != wires_.end(); it++) + for (auto it = wires_.begin(); it != wires_.end(); ++it) delete it->second; - for (auto it = memories.begin(); it != memories.end(); it++) + for (auto it = memories.begin(); it != memories.end(); ++it) delete it->second; - for (auto it = cells_.begin(); it != cells_.end(); it++) + for (auto it = cells_.begin(); it != cells_.end(); ++it) delete it->second; - for (auto it = processes.begin(); it != processes.end(); it++) + for (auto it = processes.begin(); it != processes.end(); ++it) delete it->second; } @@ -2258,7 +2258,7 @@ void RTLIL::SigSpec::unpack() const #define DJB2(_hash, _value) (_hash) = (((_hash) << 5) + (_hash)) + (_value) -void RTLIL::SigSpec::hash() const +void RTLIL::SigSpec::updhash() const { RTLIL::SigSpec *that = (RTLIL::SigSpec*)this; @@ -2721,8 +2721,8 @@ bool RTLIL::SigSpec::operator <(const RTLIL::SigSpec &other) const if (chunks_.size() != other.chunks_.size()) return chunks_.size() < other.chunks_.size(); - hash(); - other.hash(); + updhash(); + other.updhash(); if (hash_ != other.hash_) return hash_ < other.hash_; @@ -2753,8 +2753,8 @@ bool RTLIL::SigSpec::operator ==(const RTLIL::SigSpec &other) const if (chunks_.size() != chunks_.size()) return false; - hash(); - other.hash(); + updhash(); + other.updhash(); if (hash_ != other.hash_) return false; |