[PATCH] D71930: [MLIR][spirv] Add basic definitions for supporting versions
Lei Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 27 07:54:01 PST 2019
antiagainst created this revision.
antiagainst added reviewers: mravishankar, denis13.
Herald added subscribers: llvm-commits, shauheen, burmako, jpienaar, rriddle, mehdi_amini, jfb, mgorny.
Herald added a project: LLVM.
SPIR-V has a few mechanisms to control op availability: version,
extension, and capabilities. These mechanisms are considered as
different availability classes.
This commit introduces basic definitions for modelling SPIR-V
availability classes. Specifically, an `Availability` class is
added to SPIRVBase.td, along with two subclasses: MinVersion
and MaxVersion for versioning. SPV_Op is extended to take a
list of `Availability`. Each `Availability` instance carries
information for generating op interfaces for the corresponding
availability class and also the concrete availability
requirements.
With the availability spec on ops, we can now auto-generate the
op interfaces of all SPIR-V availability classes and also
synthesize the op's implementations of these interfaces. The
interface generation is done via new TableGen backends
-gen-avail-interface-{decls|defs}. The op's implementation is
done via -gen-spirv-avail-impls.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71930
Files:
mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
mlir/lib/Dialect/SPIRV/CMakeLists.txt
mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
mlir/test/CMakeLists.txt
mlir/test/Dialect/CMakeLists.txt
mlir/test/Dialect/SPIRV/CMakeLists.txt
mlir/test/Dialect/SPIRV/TestAvailability.cpp
mlir/test/Dialect/SPIRV/availability.mlir
mlir/tools/mlir-opt/CMakeLists.txt
mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71930.235416.patch
Type: text/x-patch
Size: 34196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191227/37b0b3f0/attachment.bin>
More information about the llvm-commits
mailing list