[clang] d20f9f8 - [Docs] [HLSL] Add IR reference for HLSL
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 08:30:25 PDT 2022
Author: Chris Bieneman
Date: 2022-09-23T10:29:54-05:00
New Revision: d20f9f8d2177cd02184bb2c2794af398ba355f61
URL: https://github.com/llvm/llvm-project/commit/d20f9f8d2177cd02184bb2c2794af398ba355f61
DIFF: https://github.com/llvm/llvm-project/commit/d20f9f8d2177cd02184bb2c2794af398ba355f61.diff
LOG: [Docs] [HLSL] Add IR reference for HLSL
HLSL uses a variety of named IR metadata and attributes to convey
additional information from the frontend to the backend. This document
tries to capture and document the named annotations to provide a
reference for future contributors.
Reviewed By: python3kgae
Differential Revision: https://reviews.llvm.org/D134304
Added:
clang/docs/HLSL/HLSLIRReference.rst
Modified:
clang/docs/HLSL/HLSLDocs.rst
Removed:
################################################################################
diff --git a/clang/docs/HLSL/HLSLDocs.rst b/clang/docs/HLSL/HLSLDocs.rst
index 2cfe631da939..a02dd2e8a962 100644
--- a/clang/docs/HLSL/HLSLDocs.rst
+++ b/clang/docs/HLSL/HLSLDocs.rst
@@ -11,5 +11,6 @@ HLSL Design and Implementation
.. toctree::
:maxdepth: 1
+ HLSLIRReference
ResourceTypes
EntryFunctions
diff --git a/clang/docs/HLSL/HLSLIRReference.rst b/clang/docs/HLSL/HLSLIRReference.rst
new file mode 100644
index 000000000000..c0d8d33f33bf
--- /dev/null
+++ b/clang/docs/HLSL/HLSLIRReference.rst
@@ -0,0 +1,31 @@
+=================
+HLSL IR Reference
+=================
+
+.. contents::
+ :local:
+
+Introduction
+============
+
+The goal of this document is to provide a reference for all the special purpose
+IR metadata and attributes used by the HLSL code generation path.
+
+IR Metadata
+===========
+
+``hlsl.uavs``
+-------------
+
+The ``hlsl.uavs`` metadata is a list of all the external global variables that
+represent UAV resources.
+
+Function Attributes
+===================
+
+``hlsl.shader``
+---------------
+
+The ``hlsl.shader`` function attribute is a string attribute applied to entry
+functions. The value is the string representation of the shader stage (i.e.
+``compute``, ``pixel``, etc).
More information about the cfe-commits
mailing list