[llvm-branch-commits] [clang] [Clang][AMDGPU][Docs] Add builtin documentation for AMDGPU builtins (PR #181574)

Krzysztof Drewniak via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 16 16:46:08 PST 2026


================
@@ -0,0 +1,291 @@
+//===--- BuiltinsAMDGPUDocs.td - AMDGPU Builtin Documentation ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines documentation records for AMDGPU builtins. It is included
+// by BuiltinsAMDGPU.td and used by the -gen-builtin-docs TableGen backend to
+// generate AMDGPUBuiltinReference.rst.
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+// Global introduction
+//===----------------------------------------------------------------------===//
+
+def GlobalDocumentation {
+  code Intro = [{..
+  -------------------------------------------------------------------
+  NOTE: This file is automatically generated by running clang-tblgen
----------------
krzysz00 wrote:

... Huh, I didn't know that that was Clang convention

MLIR convention is that the docs go inline, and I think that makes more sense - especially when the builtins are almost always 1:1 with intrinsics and said intrinsics already have doc comments that could become `[{ docs )]` blocks

https://github.com/llvm/llvm-project/pull/181574


More information about the llvm-branch-commits mailing list