mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	 ab786d3b98
			
		
	
	
		ab786d3b98
		
	
	
	
	
		
			
			When preparing a function's coverage counters and metadata during codegen, any part of the original coverage graph that was removed by MIR optimizations can be treated as having an execution count of zero. Somewhat counter-intuitively, if we give those unreachable nodes a _higher_ priority for receiving physical counters (instead of counter expressions), that ends up reducing the total number of physical counters needed. This works because if a node is unreachable, we don't actually create a physical counter for it. Instead that node gets a fixed zero counter, and any other node that would have relied on that physical counter in its counter expression can just ignore that term completely.
		
			
				
	
	
		
			14 lines
		
	
	
		
			569 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			569 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| Function name: assert_not::main
 | |
| Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 01, 12, 01, 02, 05, 00, 14, 01, 01, 05, 00, 14, 01, 01, 05, 00, 16, 01, 01, 01, 00, 02]
 | |
| Number of files: 1
 | |
| - file 0 => global file 1
 | |
| Number of expressions: 0
 | |
| Number of file 0 mappings: 5
 | |
| - Code(Counter(0)) at (prev + 6, 1) to (start + 1, 18)
 | |
| - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 20)
 | |
| - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 20)
 | |
| - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 22)
 | |
| - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
 | |
| Highest counter ID seen: c0
 | |
| 
 |