[llvm] [llvm][ctx_profile] Add the `llvm.instrprof.callsite` intrinsic (PR #89939)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 10:14:12 PDT 2024
================
@@ -14139,6 +14139,37 @@ Semantics:
""""""""""
See description of '``llvm.instrprof.increment``' intrinsic.
+'``llvm.instrprof.callsite``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+::
+
+ declare void @llvm.instrprof.callsite(ptr <name>, i64 <hash>,
+ i32 <num-counters>,
+ i32 <index>, ptr <callsite>)
+
+Overview:
+"""""""""
+
+The '``llvm.instrprof.callsite``' intrinsic should be emitted before a callsite
+that's not to a "fake" callee (like another intrinsic or asm).
+
+Arguments:
+""""""""""
+The first 3 arguments are similar to ``llvm.instrprof.increment``. The indexing
+is specific to callsites, meaning callsites are indexed from 0, independent from
+the indexes used by the other intrinsics (such as
+``llvm.instrprof.increment[.step]``).
+
+The last argument is the called value of the callsite this intrinsic precedes.
+
+Semantics:
+""""""""""
+This is lowered by contextual profiling.
----------------
mtrofin wrote:
done
https://github.com/llvm/llvm-project/pull/89939
More information about the llvm-commits
mailing list