mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	ast: remove null_check as dead code
This commit is contained in:
		
							parent
							
								
									25d2a8ce3a
								
							
						
					
					
						commit
						646c45e6b8
					
				
					 2 changed files with 0 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -260,7 +260,6 @@ namespace AST
 | 
			
		|||
		// simplify() creates a simpler AST by unrolling for-loops, expanding generate blocks, etc.
 | 
			
		||||
		// it also sets the id2ast pointers so that identifier lookups are fast in genRTLIL()
 | 
			
		||||
		bool simplify(bool const_fold, int stage, int width_hint, bool sign_hint);
 | 
			
		||||
		void null_check();
 | 
			
		||||
		void replace_result_wire_name_in_function(const std::string &from, const std::string &to);
 | 
			
		||||
		std::unique_ptr<AstNode> readmem(bool is_readmemh, std::string mem_filename, AstNode *memory, int start_addr, int finish_addr, bool unconditional_init);
 | 
			
		||||
		void expand_genblock(const std::string &prefix);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -888,16 +888,6 @@ static void check_auto_nosync(AstNode *node)
 | 
			
		|||
		check_auto_nosync(child.get());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void AstNode::null_check()
 | 
			
		||||
{
 | 
			
		||||
	for (auto& child : children) {
 | 
			
		||||
		// if (!child)
 | 
			
		||||
		// 	VALGRIND_PRINTF_BACKTRACE("null child");
 | 
			
		||||
		log_assert((bool) child);
 | 
			
		||||
		child->null_check();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// convert the AST into a simpler AST that has all parameters substituted by their
 | 
			
		||||
// values, unrolled for-loops, expanded generate blocks, etc. when this function
 | 
			
		||||
// is done with an AST it can be converted into RTLIL using genRTLIL().
 | 
			
		||||
| 
						 | 
				
			
			@ -906,7 +896,6 @@ void AstNode::null_check()
 | 
			
		|||
// nodes that link to a different node using names and lexical scoping.
 | 
			
		||||
bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hint)
 | 
			
		||||
{
 | 
			
		||||
	// null_check();
 | 
			
		||||
	static int recursion_counter = 0;
 | 
			
		||||
	static bool deep_recursion_warning = false;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -4434,7 +4423,6 @@ apply_newNode:
 | 
			
		|||
		// dumpAst(stderr, "- ");
 | 
			
		||||
		// newNode->dumpAst(stderr, "+ ");
 | 
			
		||||
		log_assert(newNode != nullptr);
 | 
			
		||||
		// newNode->null_check();
 | 
			
		||||
		newNode->location.begin.filename = location.begin.filename;
 | 
			
		||||
		newNode->location = location;
 | 
			
		||||
		newNode->cloneInto(*this);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue