[clang] [llvm] [clang][ubsan] Switch UBSAN optimization to `llvm.allow.{runtime,ubsan}.check()` (PR #84858)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 17:39:40 PDT 2024


================
@@ -3805,6 +3812,12 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
                                     SanitizerHandler CheckHandlerID) {
   llvm::BasicBlock *Cont = createBasicBlock("cont");
 
+  if (ClSanitizeExpHot) {
+    Checked =
+        Builder.CreateOr(Checked, Builder.CreateCall(CGM.getIntrinsic(
+                                      llvm::Intrinsic::experimental_hot)));
----------------
vitalybuka wrote:

Thanks, Added TODO, will do in followup patches.
In this patch I'd like just switch approach.

https://github.com/llvm/llvm-project/pull/84858


More information about the cfe-commits mailing list