[PATCH] D151996: [AMDGPU] Start documenting calling conventions. NFC

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 06:44:25 PDT 2023


rovka created this revision.
rovka added reviewers: AMDGPU, nhaehnle, foad, dstuttard, t-tye, arsenm.
Herald added subscribers: StephenFan, kerbowa, tpr, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
rovka requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Add a section to AMDGPUUsage.rst about calling conventions and list the
ones from the CallingConv enum. Full descriptions can come later (help
appreciated).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151996

Files:
  llvm/docs/AMDGPUUsage.rst


Index: llvm/docs/AMDGPUUsage.rst
===================================================================
--- llvm/docs/AMDGPUUsage.rst
+++ llvm/docs/AMDGPUUsage.rst
@@ -1036,6 +1036,58 @@
 
      ======================================= ==========================================================
 
+Calling conventions
+-------------------
+
+The AMDGPU backend supports the following calling conventions:
+
+  .. table:: AMDGPU Calling Conventions
+     :name: amdgpu-cc
+
+     =============================== ==========================================================
+     Calling Convention              Description
+     =============================== ==========================================================
+     ``amdgpu_vs``                   Used for Mesa vertex shaders, or 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_gs``                   Used for Mesa/AMDPAL geometry shaders.
+                                     ..TODO::
+                                     Describe.
+
+     ``amdgpu_ps``                   Used for Mesa/AMDPAL pixel shaders.
+                                     ..TODO::
+                                     Describe.
+
+     ``amdgpu_hs``                   Used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
+                                     ..TODO::
+                                     Describe.
+
+     ``amdgpu_ls``                   Used for AMDPAL vertex shader if tessellation is in use.
+                                     ..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_cs``                   Used for Mesa/AMDPAL compute shaders.
+                                     ..TODO::
+                                     Describe.
+
+     ``amdgpu_kernel``               See :ref:`amdgpu-amdhsa-initial-kernel-execution-state`
+
+     ``amdgpu_gfx``                  Used for AMD graphics targets.
+                                     ..TODO::
+                                     Describe.
+
+     =============================== ==========================================================
+
+
 .. _amdgpu-elf-code-object:
 
 ELF Code Object


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151996.527846.patch
Type: text/x-patch
Size: 2832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230602/839dea00/attachment-0001.bin>


More information about the llvm-commits mailing list