[PATCH] D75875: [mlir][spirv] Support querying type extension/capability requirements

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 14:35:39 PDT 2020


antiagainst created this revision.
antiagainst added a reviewer: denis13.
Herald added subscribers: llvm-commits, bader, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: mravishankar.
Herald added a project: LLVM.
antiagainst added a child revision: D75876: [mlir][spirv] Let SPIRVConversionTarget consider type availability.

Previously we only consider the version/capability/extension requirements
on ops themselves. Some types in SPIR-V also require special extensions
or capabilities to be used. For example, non-32-bit integers/floats
will require different capabilities and/or extensions depending on
where they are used because it may mean special hardware abilities.

This commit adds query methods to SPIR-V type class hierarchy to support
querying extensions and capabilities. We don't go through ODS for
auto-generating such information given that we don't have them in
SPIR-V machine readable grammar and there are just a few types.

Depends On D75874 <https://reviews.llvm.org/D75874>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75875

Files:
  mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
  mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
  mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
  mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
  mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75875.249220.patch
Type: text/x-patch
Size: 32164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200309/acc05731/attachment.bin>


More information about the llvm-commits mailing list