[llvm-branch-commits] [clang][ubsan] Switch UBSAN optimization to `llvm.experimental.hot` (PR #84858)

Jon Roelofs via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 11 17:30:06 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)));
----------------
jroelofs wrote:

This would be the moral equivalent of diagnose_if

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


More information about the llvm-branch-commits mailing list