beanz created this revision. beanz added reviewers: pow2clk, python3kgae. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang.
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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D134304 Files: clang/docs/HLSL/HLSLDocs.rst clang/docs/HLSL/HLSLIRReference.rst Index: clang/docs/HLSL/HLSLIRReference.rst =================================================================== --- /dev/null +++ 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 global variables that represent +to 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). Index: clang/docs/HLSL/HLSLDocs.rst =================================================================== --- clang/docs/HLSL/HLSLDocs.rst +++ clang/docs/HLSL/HLSLDocs.rst @@ -11,5 +11,6 @@ .. toctree:: :maxdepth: 1 + HLSLIRReference ResourceTypes EntryFunctions
Index: clang/docs/HLSL/HLSLIRReference.rst =================================================================== --- /dev/null +++ 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 global variables that represent +to 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). Index: clang/docs/HLSL/HLSLDocs.rst =================================================================== --- clang/docs/HLSL/HLSLDocs.rst +++ clang/docs/HLSL/HLSLDocs.rst @@ -11,5 +11,6 @@ .. toctree:: :maxdepth: 1 + HLSLIRReference ResourceTypes EntryFunctions
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits