Two things in this diff:
- Warn on the invalid range, currently three types of checking, see the detailed message in the code.
- In some situation, llvm-profgen gives lots of warnings on the truncated stacks which is noisy. This change provides a switch to --show-detailed-warning to skip the warnings. Alternatively, we use a summary for those warning and show the percentage of cases with those issues.
Example of warning summary.
warning: 0.05%(1120/2428958) cases with issue: Profile context truncated due to missing probe for call instruction. warning: 0.00%(2/178637) cases with issue: Range does not belong to any functions, likely from external function.
nit: name it `filter-invalid-lbr-ranges" and flip the default value?