[llvm] [AllocToken] Introduce sanitize_alloc_token attribute and alloc_token metadata (PR #160131)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 05:56:06 PDT 2025


================
@@ -8389,6 +8392,13 @@ Example:
 The ``nofree`` metadata indicates the memory pointed by the pointer will not be
 freed after the attached instruction.
 
+'``alloc_token``' Metadata
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``alloc_token`` metadata may be attached to calls to memory allocation
+functions, and contains richer semantic information about the type of the
+allocation. This information is consumed by the ``alloc-token`` pass to
+instrument such calls with allocation token IDs.
----------------
nikic wrote:

This needs to specify what the actual format of the metadata is (and verify that format, and that it is attached to the correct instruction type in the IR verifier).

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


More information about the llvm-commits mailing list