Fixed performance bug in object hashing

This commit is contained in:
Clifford Wolf 2014-12-28 19:03:18 +01:00
parent 89723a45cf
commit f3a97b75c7
2 changed files with 6 additions and 6 deletions

View File

@ -236,7 +236,7 @@ void RTLIL::Selection::optimize(RTLIL::Design *design)
RTLIL::Design::Design() RTLIL::Design::Design()
{ {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
refcount_modules_ = 0; refcount_modules_ = 0;
@ -450,7 +450,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_whole_modules_warn() const
RTLIL::Module::Module() RTLIL::Module::Module()
{ {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
design = nullptr; design = nullptr;
@ -1741,7 +1741,7 @@ RTLIL::Cell* RTLIL::Module::addDlatchsrGate(RTLIL::IdString name, RTLIL::SigSpec
RTLIL::Wire::Wire() RTLIL::Wire::Wire()
{ {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
module = nullptr; module = nullptr;
@ -1755,7 +1755,7 @@ RTLIL::Wire::Wire()
RTLIL::Memory::Memory() RTLIL::Memory::Memory()
{ {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
width = 1; width = 1;
@ -1764,7 +1764,7 @@ RTLIL::Memory::Memory()
RTLIL::Cell::Cell() : module(nullptr) RTLIL::Cell::Cell() : module(nullptr)
{ {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
} }

View File

@ -712,7 +712,7 @@ struct RTLIL::Monitor
unsigned int hash() const { return hashidx_; } unsigned int hash() const { return hashidx_; }
Monitor() { Monitor() {
unsigned int hashidx_count = 0; static unsigned int hashidx_count = 0;
hashidx_ = hashidx_count++; hashidx_ = hashidx_count++;
} }