Files
llvm-project/llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp
Marco Elver 75432ce3c9 [LowerAllowCheck] Add llvm.allow.sanitize.* intrinsics (#172029)
Add new intrinsics:
  - llvm.allow.sanitize.address
  - llvm.allow.sanitize.thread
  - llvm.allow.sanitize.memory
  - llvm.allow.sanitize.hwaddress

These intrinsics return true if the corresponding sanitizer is enabled
for the function, and false otherwise. They are lowered by
LowerAllowCheckPass to constant booleans based on the corresponding
sanitize_* function attributes. LowerAllowCheckPass is now "required" to
run on functions with optnone to ensure correct lowering at O0.

The LowerAllowCheckPass already performs similar duties for
@llvm.allow.runtime.check and @llvm.allow.ubsan.check, although with
subtly different semantics (based on profiles and/or sampling). In this
case, we want to make the true/false decision based on if any one of
address/memory/thread sanitization is enabled.
2026-01-03 16:20:43 +01:00

7.5 KiB