llvm-project
dccd2711 - [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass<cutoffs> (#124857)

Commit
243 days ago
[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass<cutoffs> (#124857) This adds the plumbing between -fsanitize-skip-hot-cutoff (introduced in https://github.com/llvm/llvm-project/pull/121619) and LowerAllowCheckPass<cutoffs> (introduced in https://github.com/llvm/llvm-project/pull/124211). The net effect is that -fsanitize-skip-hot-cutoff now combines the functionality of -ubsan-guard-checks and -lower-allow-check-percentile-cutoff (though this patch does not remove those yet), and generalizes the latter to allow per-sanitizer cutoffs. Note: this patch replaces Intrinsic::allow_ubsan_check's SanitizerHandler parameter with SanitizerOrdinal; this is necessary because the hot cutoffs are specified in terms of SanitizerOrdinal (e.g., null, alignment), not SanitizerHandler (e.g., TypeMismatch). Likewise, CodeGenFunction::EmitCheck is changed to emit allow_ubsan_check() for each individual check. --------- Co-authored-by: Vitaly Buka <vitalybuka@gmail.com> Co-authored-by: Vitaly Buka <vitalybuka@google.com>
Author
Parents
Loading