[PATCH] D75870: [mlir][spirv] Add a pass to deduce version/extension/capability

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 14:03:42 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, jfb, mgorny.
Herald added a reviewer: mravishankar.
Herald added a project: LLVM.
antiagainst added a child revision: D75871: [mlir][spirv] NFC: put SPIR-V attributes in separate files.

Creates an operation pass that deduces and attaches the minimal version/
capabilities/extensions requirements for spv.module ops.

For each spv.module op, this pass requires a `spv.target_env` attribute on
it or an enclosing module-like op to drive the deduction. The reason is
that an op can be enabled by multiple extensions/capabilities. So we need
to know which one to pick. `spv.target_env` gives the hard limit as for
what the target environment can support; this pass deduces what are
actually needed for a specific spv.module op.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75870

Files:
  mlir/include/mlir/Dialect/SPIRV/Passes.h
  mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
  mlir/include/mlir/InitAllPasses.h
  mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
  mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
  mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
  mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75870.249210.patch
Type: text/x-patch
Size: 17277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200309/c074f68a/attachment-0001.bin>


More information about the llvm-commits mailing list