[llvm] [llvm][ctx_profile] Add the `llvm.instrprof.callsite` intrinsic (PR #89939)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 09:42:46 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
----------------
snehasish wrote:

We should take the opportunity to improve instead of following what exists. I think it's low overhead to include it in here inline.

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


More information about the llvm-commits mailing list