[llvm-branch-commits] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 12 01:56:45 PDT 2024
================
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace
it with any other `i1` value. Any pass can
freely do it if it can benefit from non-default lowering.
+'``llvm.experimental.hot``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+::
+
+ declare i1 @llvm.experimental.hot()
+
+Overview:
+"""""""""
+
+This intrinsic returns true iff it's known that containing basic block is hot in
+profile.
+
+When used with profile based optimization allows to change program behaviour
+deppending on the code hotness.
+
+Arguments:
+""""""""""
+
+None.
+
+Semantics:
+""""""""""
+
+The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`,
+deppending on profile used. Expresion is evaluated as `true` iff profile and
+summary are availible and profile counter for the block reach hotness threshold.
----------------
nikic wrote:
```suggestion
summary are available and profile counter for the block reach hotness threshold.
```
https://github.com/llvm/llvm-project/pull/84850
More information about the llvm-branch-commits
mailing list