[PATCH] D77174: [mlir][spirv] Include SPIR-V op definitions in main SPIR-V doc

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 15:30:02 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGee77607ca6ce: [mlir][spirv] Include SPIR-V op definitions in main SPIR-V doc (authored by antiagainst).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77174/new/

https://reviews.llvm.org/D77174

Files:
  mlir/docs/Dialects/SPIR-V.md
  mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt


Index: mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
===================================================================
--- mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
+++ mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_mlir_dialect(SPIRVOps spv)
-add_mlir_doc(SPIRVOps -gen-dialect-doc SPIRVDialect Dialects/)
+add_mlir_doc(SPIRVOps -gen-op-doc SPIRVOps Dialects/)
 
 set(LLVM_TARGET_DEFINITIONS SPIRVBase.td)
 mlir_tablegen(SPIRVEnums.h.inc -gen-enum-decls)
Index: mlir/docs/Dialects/SPIR-V.md
===================================================================
--- mlir/docs/Dialects/SPIR-V.md
+++ mlir/docs/Dialects/SPIR-V.md
@@ -15,6 +15,8 @@
 [human-readable specification][SpirvSpec]; the syntax of various SPIR-V
 instructions are encoded in a [machine-readable grammar][SpirvGrammar].
 
+[TOC]
+
 ## Design Guidelines
 
 SPIR-V is a binary intermediate language that serves dual purpose: on one side,
@@ -459,8 +461,9 @@
 ```
 
 Operation documentation is written in each op's Op Definition Spec using
-TableGen. A markdown version of the doc can be found at
-[mlir.llvm.org][LlvmMlirSpirvDoc] or generated using `mlir-tblgen -gen-doc`.
+TableGen. A markdown version of the doc can be generated using
+`mlir-tblgen -gen-doc` and is attached in the
+[Operation definitions](#operation-definitions) section.
 
 ### Ops from extended instruction sets
 
@@ -1224,6 +1227,10 @@
 operations contained within its region are valid operations in the SPIR-V
 dialect.
 
+## Operation definitions
+
+[include "Dialects/SPIRVOps.md"]
+
 [Spirv]: https://www.khronos.org/registry/spir-v/
 [SpirvSpec]: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html
 [SpirvLogicalLayout]: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#_a_id_logicallayout_a_logical_layout_of_a_module
@@ -1270,7 +1277,6 @@
 [GitHubDialectTracking]: https://github.com/tensorflow/mlir/issues/302
 [GitHubLoweringTracking]: https://github.com/tensorflow/mlir/issues/303
 [GenSpirvUtilsPy]: https://github.com/llvm/llvm-project/blob/master/mlir/utils/spirv/gen_spirv_dialect.py
-[LlvmMlirSpirvDoc]: ../Dialects/SPIRVOps/
 [CustomTypeAttrTutorial]: ../DefiningAttributesAndTypes/
 [VulkanSpirv]: https://renderdoc.org/vkspec_chunked/chap40.html#spirvenv
 [VulkanShaderInterface]: https://renderdoc.org/vkspec_chunked/chap14.html#interfaces-resources


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77174.254024.patch
Type: text/x-patch
Size: 2372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200331/5988da95/attachment.bin>


More information about the llvm-commits mailing list