[llvm-branch-commits] [clang] [llvm] [llvm] Introduce callee_type metadata (PR #87573)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 13 16:12:14 PDT 2025
================
@@ -0,0 +1,32 @@
+====================
+Callee Type Metadata
+====================
+
+Introduction
+============
+This ``!callee_type`` metadata is introduced as part of an ongoing effort to generate a call graph
+section in the object file. The broader design for the call graph section and the compiler flags which
+will enable the feature will be documented as those changes land. The ``!callee_type`` metadata is used
+to identify types of intended callees of indirect call instructions. The ``!callee_type`` metadata is a
+list of one or more ``!type`` metadata objects (See :doc:`TypeMetadata`) with each ``!type`` metadata
+pointing to a callee's :ref:`type identifier
+<calleetype-type-identifier>`.
+
+.. _calleetype-type-identifier:
+
+Type identifier
+================
+
+The type for an indirect call target is the callee's function signature.
+Mapping from a type to an identifier is an ABI detail.
+In the current implementation, an identifier of type T is
+computed as follows:
----------------
ilovepi wrote:
It may be worth mentioning that this is the same type identifier used by CFI.
https://github.com/llvm/llvm-project/pull/87573
More information about the llvm-branch-commits
mailing list