[PATCH] D72760: [mlir][spirv] Add implied capabilities and availability for capabilities

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 05:15:43 PST 2020


antiagainst created this revision.
antiagainst added reviewers: benvanik, denis13.
Herald added subscribers: llvm-commits, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, jpienaar, rriddle, mehdi_amini, jfb.
Herald added a reviewer: mravishankar.
Herald added a project: LLVM.

Certain SPIR-V capabilities are only available in certain SPIR-V versions
or extensions. Also a SPIR-V capability may implicitly declares other
capabilities.

This commit updates gen_spirv_dialect.py to support generating such
information into SPIRVBase.td. It requires us to topologically sort
all capabilities because now a capability can refer to another one.

This commits also registers a few extensions because their symbols are
used by capability availability.

Note that this commit hasn't updated SPIRVConversionTarget to take
into consideration such relationship yet. That will be done in a
following-up commit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72760

Files:
  mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
  mlir/utils/spirv/gen_spirv_dialect.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72760.238222.patch
Type: text/x-patch
Size: 62412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200115/8c155ae8/attachment.bin>


More information about the llvm-commits mailing list