[llvm-branch-commits] [IR] Introduce `llvm.experimental.hot()` (PR #84850)

Dmitry Vyukov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 12 00:43:52 PDT 2024


================
@@ -1722,6 +1722,11 @@ def int_debugtrap : Intrinsic<[]>,
 def int_ubsantrap : Intrinsic<[], [llvm_i8_ty],
                               [IntrNoReturn, IntrCold, ImmArg<ArgIndex<0>>]>;
 
+// Return true if profile counter for containing block is hot.
+def int_experimental_hot : Intrinsic<[llvm_i1_ty], [],
+                                      [IntrInaccessibleMemOnly, IntrWriteMem,
----------------
dvyukov wrote:

Can't IntrWriteMem have significant effect on performance of the generated code? Why exactly do we need it? A comment would be useful. It's not writing to memory, is there a more precise attribute to capture what we need?

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


More information about the llvm-branch-commits mailing list