[llvm] Add reference of llvm.pseudoprobe in LangRef.md (PR #223065)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 16:50:53 PDT 2026
================
@@ -27071,6 +27071,55 @@ None.
This intrinsic actually does nothing, but optimizers must assume that it
has externally observable side effects.
+(llvm_pseudoprobe)=
+
+#### '`llvm.pseudoprobe`' Intrinsic
+
+##### Syntax:
+
+```
+declare void @llvm.pseudoprobe(i64 <guid>, i64 <index>, i32 <attributes>, i64 <factor>) nounwind willreturn memory(inaccessiblemem: readwrite)
+```
+
+##### Overview:
+
+The `llvm.pseudoprobe` intrinsic is a placeholder for the block that
+contains it. It is emitted for sample-based profile-guided optimization, so
+that samples collected from an optimized binary can be attributed back to a
+point in the original program. It performs no operation.
+
+Like `llvm.sideeffect`, optimizers treat it as having opaque side effects, so
+that it is neither deleted nor moved out of the block it probes. A probe that
+disappears or moves breaks the correspondence between the collected profile
+and the code it describes.
+
+##### Arguments:
+
+The first argument is the GUID of the function containing the probe. It
+identifies an entry in the module-level `!llvm.pseudo_probe_desc` metadata,
+which records the same GUID together with the function's CFG hash and name.
+
+The second argument is the index of the probe, unique within its function.
+
+The third argument is a bit mask of probe attributes.
----------------
MatzeB wrote:
well should document the attributes here probably
https://github.com/llvm/llvm-project/pull/223065
More information about the llvm-commits
mailing list