@@ -1064,6 +1064,67 @@ The AMDGPU backend supports the following LLVM IR attributes.
1064
1064
1065
1065
======================================= ==========================================================
1066
1066
1067
+ Calling Conventions
1068
+ -------------------
1069
+
1070
+ The AMDGPU backend supports the following calling conventions:
1071
+
1072
+ .. table:: AMDGPU Calling Conventions
1073
+ :name: amdgpu-cc
1074
+
1075
+ =============================== ==========================================================
1076
+ Calling Convention Description
1077
+ =============================== ==========================================================
1078
+ ``ccc`` The C calling convention. Used by default.
1079
+ See :ref:`amdgpu-amdhsa-function-call-convention-non-kernel-functions`
1080
+ for more details.
1081
+
1082
+ ``fastcc`` The fast calling convention. Mostly the same as the ``ccc``.
1083
+
1084
+ ``coldcc`` The cold calling convention. Mostly the same as the ``ccc`.
1085
+
1086
+ ``amdgpu_cs`` Used for Mesa/AMDPAL compute shaders.
1087
+ ..TODO::
1088
+ Describe.
1089
+
1090
+ ``amdgpu_es`` Used for AMDPAL shader stage before geometry shader if geometry is in
1091
+ use. So either the domain (= tessellation evaluation) shader if
1092
+ tessellation is in use, or otherwise the vertex shader.
1093
+ ..TODO::
1094
+ Describe.
1095
+
1096
+ ``amdgpu_gfx`` Used for AMD graphics targets. Functions with this calling convention
1097
+ cannot be used as entry points.
1098
+ ..TODO::
1099
+ Describe.
1100
+
1101
+ ``amdgpu_gs`` Used for Mesa/AMDPAL geometry shaders.
1102
+ ..TODO::
1103
+ Describe.
1104
+
1105
+ ``amdgpu_hs`` Used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
1106
+ ..TODO::
1107
+ Describe.
1108
+
1109
+ ``amdgpu_kernel`` See :ref:`_amdgpu-amdhsa-function-call-convention-kernel-functions`
1110
+
1111
+ ``amdgpu_ls`` Used for AMDPAL vertex shader if tessellation is in use.
1112
+ ..TODO::
1113
+ Describe.
1114
+
1115
+ ``amdgpu_ps`` Used for Mesa/AMDPAL pixel shaders.
1116
+ ..TODO::
1117
+ Describe.
1118
+
1119
+ ``amdgpu_vs`` Used for Mesa/AMDPAL last shader stage before rasterization (vertex
1120
+ shader if tessellation and geometry are not in use, or otherwise
1121
+ copy shader if one is needed).
1122
+ ..TODO::
1123
+ Describe.
1124
+
1125
+ =============================== ==========================================================
1126
+
1127
+
1067
1128
.. _amdgpu-elf-code-object:
1068
1129
1069
1130
ELF Code Object
0 commit comments