mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	IdString optimization
This commit is contained in:
		
							parent
							
								
									60f16e17af
								
							
						
					
					
						commit
						7d6a7fe2ce
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -121,6 +121,12 @@ namespace RTLIL
 | 
			
		|||
			global_id_index_[global_id_storage_.at(idx)] = idx;
 | 
			
		||||
			global_refcount_storage_.at(idx)++;
 | 
			
		||||
 | 
			
		||||
			// Avoid Create->Delete->Create pattern
 | 
			
		||||
			static IdString last_created_id;
 | 
			
		||||
			put_reference(last_created_id.index_);
 | 
			
		||||
			last_created_id.index_ = idx;
 | 
			
		||||
			get_reference(last_created_id.index_);
 | 
			
		||||
 | 
			
		||||
			if (yosys_xtrace) {
 | 
			
		||||
				log("#X# New IdString '%s' with index %d.\n", p, idx);
 | 
			
		||||
				log_backtrace("-X- ", yosys_xtrace-1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue