[mlir][spirv] Fix script for availability autogen and refresh ops
authorLei Zhang <antiagainst@google.com>
Fri, 22 Jan 2021 18:03:59 +0000 (13:03 -0500)
committerLei Zhang <antiagainst@google.com>
Fri, 22 Jan 2021 18:07:36 +0000 (13:07 -0500)
commit167fb9b4b4352cdea92ccfdfb205c7ed4470d3ef
tree8da7c5a95287704cadcec0e65f36543cf84ca525
parentdc057e87f6c18c24d17c7cae97ebe95f78b6d934
[mlir][spirv] Fix script for availability autogen and refresh ops

Previously we only autogen the availability for ops that are
direct instantiating `SPV_Op` and expected other subclasses of
`SPV_Op` to define aggregated availability for all ops. This is
quite error prone and we can miss capabilities for certain ops.
Also it's arguable to have multiple levels of subclasses and try
to deduplicate too much: having the availability directly in the
op can be quite explicit and clear. A few extra lines of
declarative code is fine.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D95236
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBitOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMatrixOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMemoryOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVNonUniformOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
mlir/utils/spirv/gen_spirv_dialect.py