mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Optimizing no-op cell->setPort()
This commit is contained in:
		
							parent
							
								
									8ce8a230f4
								
							
						
					
					
						commit
						b32ba6f568
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -1839,7 +1839,9 @@ void RTLIL::Cell::setPort(RTLIL::IdString portname, RTLIL::SigSpec signal)
 | 
				
			||||||
		connections_[portname] = RTLIL::SigSpec();
 | 
							connections_[portname] = RTLIL::SigSpec();
 | 
				
			||||||
		conn_it = connections_.find(portname);
 | 
							conn_it = connections_.find(portname);
 | 
				
			||||||
		log_assert(conn_it != connections_.end());
 | 
							log_assert(conn_it != connections_.end());
 | 
				
			||||||
	}
 | 
						} else
 | 
				
			||||||
 | 
						if (conn_it->second == signal)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (auto mon : module->monitors)
 | 
						for (auto mon : module->monitors)
 | 
				
			||||||
		mon->notify_connect(this, conn_it->first, conn_it->second, signal);
 | 
							mon->notify_connect(this, conn_it->first, conn_it->second, signal);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue