Skip to content

Commit 4462f6b

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.6-beta.1 [skip ci]
1 parent f1051d5 commit 4462f6b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

llvm/docs/CalleeTypeMetadata.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
====================
2+
Callee Type Metadata
3+
====================
4+
5+
Introduction
6+
============
7+
This ``!callee_type`` metadata is introduced as part of an ongoing effort to generate a call graph
8+
section in the object file. The broader design for the call graph section and the compiler flags which
9+
will enable the feature will be documented as those changes land. The ``!callee_type`` metadata is used
10+
to identify types of intended callees of indirect call instructions. The ``!callee_type`` metadata is a
11+
list of one or more ``!type`` metadata objects (See :doc:`TypeMetadata`) with each ``!type`` metadata
12+
pointing to a callee's :ref:`type identifier
13+
<calleetype-type-identifier>`.
14+
15+
.. _calleetype-type-identifier:
16+
17+
Type identifier
18+
================
19+
20+
The type for an indirect call target is the callee's function signature.
21+
Mapping from a type to an identifier is an ABI detail.
22+
In the current implementation, an identifier of type T is
23+
computed as follows:
24+
25+
- Obtain the generalized mangled name for “typeinfo name for T”.
26+
- Compute MD5 hash of the name as a string.
27+
- Reinterpret the first 8 bytes of the hash as a little-endian 64-bit integer.
28+
29+
To avoid mismatched pointer types, generalizations are applied.
30+
Pointers in return and argument types are treated as equivalent as long as the qualifiers for the
31+
type they point to match. For example, ``char*``, ``char**``, and ``int*`` are considered equivalent
32+
types. However, ``char*`` and ``const char*`` are considered distinct types.

llvm/docs/LangRef.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8091,6 +8091,11 @@ change in the future.
80918091

80928092
See :doc:`TypeMetadata`.
80938093

8094+
'``callee_type``' Metadata
8095+
^^^^^^^^^^^^^^^^^^^^^^^^^^
8096+
8097+
See :doc:`CalleeTypeMetadata`.
8098+
80948099
'``associated``' Metadata
80958100
^^^^^^^^^^^^^^^^^^^^^^^^^
80968101

llvm/docs/Reference.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ LLVM and API reference documentation.
1414
BlockFrequencyTerminology
1515
BranchWeightMetadata
1616
Bugpoint
17+
CalleeTypeMetadata
1718
CIBestPractices
1819
CommandGuide/index
1920
ConvergenceAndUniformity

0 commit comments

Comments
 (0)