[all-commits] [llvm/llvm-project] 90c738: [IR] Introduce `llvm.allow.{runtime, ubsan}.check()...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Sun Mar 31 21:24:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90c738ef15fc6f10255dced0b1557f2cd2c4f43b
      https://github.com/llvm/llvm-project/commit/90c738ef15fc6f10255dced0b1557f2cd2c4f43b
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-03-31 (Sun, 31 Mar 2024)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Intrinsics.td

  Log Message:
  -----------
  [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 at redhat.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list