[llvm] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 11:12:39 PDT 2023


david-xl wrote:

> I think the error handling in llvm-profdata should be refactored:
> 
> 1. Split errors into two category, fatal error and warning. Fatal errors will be corrupted input files that makes it impossible to read the data, making llvm-profdata to exits with error. Warnings will be the ones that mean unreasonable data, but in a valid format, like counter overflow or large counter value in this case.
> 2. Use a flag control if we should treat warnings as hard errors or not.

sounds good.

For this patch, check with @xur-llvm to see if 2^56 is a good empirical threshold to warn about.

https://github.com/llvm/llvm-project/pull/69513


More information about the llvm-commits mailing list