[llvm] aa7b127 - [AMDGPU] Start documenting calling conventions. NFC
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 00:32:02 PDT 2023
Author: Diana Picus
Date: 2023-06-20T09:29:19+02:00
New Revision: aa7b127cb7314e326457d7f790d36db1cb74f63c
URL: https://github.com/llvm/llvm-project/commit/aa7b127cb7314e326457d7f790d36db1cb74f63c
DIFF: https://github.com/llvm/llvm-project/commit/aa7b127cb7314e326457d7f790d36db1cb74f63c.diff
LOG: [AMDGPU] Start documenting calling conventions. NFC
Add a section to AMDGPUUsage.rst about calling conventions and list the
ones from the CallingConv enum. Full descriptions can come later (help
appreciated).
Differential Revision: https://reviews.llvm.org/D151996
Added:
Modified:
llvm/docs/AMDGPUUsage.rst
Removed:
################################################################################
diff --git a/llvm/docs/AMDGPUUsage.rst b/llvm/docs/AMDGPUUsage.rst
index 90f50e487d8ff..ce1f16a6bf95c 100644
--- a/llvm/docs/AMDGPUUsage.rst
+++ b/llvm/docs/AMDGPUUsage.rst
@@ -1064,6 +1064,67 @@ The AMDGPU backend supports the following LLVM IR attributes.
======================================= ==========================================================
+Calling Conventions
+-------------------
+
+The AMDGPU backend supports the following calling conventions:
+
+ .. table:: AMDGPU Calling Conventions
+ :name: amdgpu-cc
+
+ =============================== ==========================================================
+ Calling Convention Description
+ =============================== ==========================================================
+ ``ccc`` The C calling convention. Used by default.
+ See :ref:`amdgpu-amdhsa-function-call-convention-non-kernel-functions`
+ for more details.
+
+ ``fastcc`` The fast calling convention. Mostly the same as the ``ccc``.
+
+ ``coldcc`` The cold calling convention. Mostly the same as the ``ccc`.
+
+ ``amdgpu_cs`` Used for Mesa/AMDPAL compute shaders.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_es`` Used for AMDPAL shader stage before geometry shader if geometry is in
+ use. So either the domain (= tessellation evaluation) shader if
+ tessellation is in use, or otherwise the vertex shader.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_gfx`` Used for AMD graphics targets. Functions with this calling convention
+ cannot be used as entry points.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_gs`` Used for Mesa/AMDPAL geometry shaders.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_hs`` Used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
+ ..TODO::
+ Describe.
+
+ ``amdgpu_kernel`` See :ref:`_amdgpu-amdhsa-function-call-convention-kernel-functions`
+
+ ``amdgpu_ls`` Used for AMDPAL vertex shader if tessellation is in use.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_ps`` Used for Mesa/AMDPAL pixel shaders.
+ ..TODO::
+ Describe.
+
+ ``amdgpu_vs`` Used for Mesa/AMDPAL last shader stage before rasterization (vertex
+ shader if tessellation and geometry are not in use, or otherwise
+ copy shader if one is needed).
+ ..TODO::
+ Describe.
+
+ =============================== ==========================================================
+
+
.. _amdgpu-elf-code-object:
ELF Code Object
More information about the llvm-commits
mailing list