[all-commits] [llvm/llvm-project] 56cf3f: [mlir][spirv][doc] Remove duplicate syntax formats...
Rik Huijzer via All-commits
all-commits at lists.llvm.org
Mon Nov 27 02:17:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 56cf3ff479ab70b4d802f935afa64a343b402a73
https://github.com/llvm/llvm-project/commit/56cf3ff479ab70b4d802f935afa64a343b402a73
Author: Rik Huijzer <github at huijzer.xyz>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVArithmeticOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBarrierOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBitOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCastOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVImageOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVIntelExtOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMatrixOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVNonUniformOps.td
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
Log Message:
-----------
[mlir][spirv][doc] Remove duplicate syntax formats (#73386)
Some operations defined their syntax both in the documentation and via
`assemblyFormat`. This leads to two syntax descriptions in the
documentation for SPIR-V, see for example the documentation for
[`spirv.mlir.yield`](https://mlir.llvm.org/docs/Dialects/SPIR-V/#spirvmliryield-spirvyieldop).
Since the `assemblyFormat` is used to generate the actual parsers and
printer implementations, this PR removes the manual syntax descriptions.
(Similar to https://github.com/llvm/llvm-project/pull/73343.)
The strategy that I used to find the duplicates was pretty
uncomplicated. I scrolled through the [SPIR-V
Dialect](https://mlir.llvm.org/docs/Dialects/SPIR-V) to find all
duplicates and then remove the duplicate text from the `td` file.
Note that the `Syntax:` block in the docs is a good proxy for whether
`assemblyFormat` is defined because it will only be generated if the op
has defined `assemblyFormat` (`op.hasAssemblyFormat()`):
https://github.com/llvm/llvm-project/blob/e970652776bd07dbe42be557bf98722749230653/mlir/tools/mlir-tblgen/OpDocGen.cpp#L108-L124
https://github.com/llvm/llvm-project/blob/e970652776bd07dbe42be557bf98722749230653/mlir/tools/mlir-tblgen/OpDocGen.cpp#L197-L199
Related issue https://github.com/llvm/llvm-project/issues/73359.
More information about the All-commits
mailing list