[PATCH] llvm-cov: Updated file checksum to be timestamp.

Yuchen Wu yuchenericwu at hotmail.com
Mon Nov 18 11:18:52 PST 2013


> Heh. I was just looking up the answer your question, and found this comment: 
> 
> "The checksum is calculated carefully so that 
> source code changes that doesn't affect the control flow graph 
> won't change the checksum. 
> This is to make the profile data useable across source code change." 
> 
> The CFG checksum appears to be a crc32 over the index numbers of the 
> destination blocks for each basic block edge. I guess the blocks are 
> numbered consistently run to run. 
> 
> The line number checksum is a checksum over the *assembler* name of the 
> function (C++ mangled or including __asm__ annotations), and the first 
> line number of the function. 
> 
> The function checksum appears to be a counter. 

Hi,

Sorry for being out of the loop, but is the consensus to implement the file checksum using this method or should I take use previous suggestion of taking an MD5 of the source?

-Yuchen 		 	   		  



More information about the llvm-commits mailing list