-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IR] Introduce
llvm.allow.{runtime,ubsan}.check()
(#84850)
The goal is to have ability to change logic compile time based on PGO data. Our primary application is removing UBSAN checks from hot code. Then we'd like to use this for libc++ hardening and regular debug asserts. Previous attempt is #84214. Benefits from special intrinsic vs #84214: 1. Resulting binary is 3% faster than removing traps (on "test-suite/MultiSource/Benchmarks" with PGO+ThinLTO) 2. Intrinsic can be used from source code to change behavior from C/C++ program. E.g. enabling asserts in cold code. 3. Easier to match basic blocks. RFC: https://discourse.llvm.org/t/rfc-add-llvm-experimental-hot-intrinsic-or-llvm-hot/77641 --------- Co-authored-by: Nikita Popov <npopov@redhat.com>
- Loading branch information
1 parent
70deb7b
commit 90c738e
Showing
2 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters