mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fixed performance bug in object hashing
This commit is contained in:
		
							parent
							
								
									89723a45cf
								
							
						
					
					
						commit
						f3a97b75c7
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -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++;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue