llvm-project/mlir/utils
Lei Zhang 267483ac70 [mlir][spirv] Support implied extensions and capabilities
In SPIR-V, when a new version is introduced, it is possible some
existing extensions will be incorporated into it so that it becomes
implicitly declared if targeting the new version. This affects
conversion target specification because we need to take this into
account when allowing what extensions to use.

For a capability, it may also implies some other capabilities,
for example, the `Shader` capability implies `Matrix` the capability.
This should also be taken into consideration when preparing the
conversion target: when we specify an capability is allowed, all
its recursively implied capabilities are also allowed.

This commit adds utility functions to query implied extensions for
a given version and implied capabilities for a given capability
and updated SPIRVConversionTarget to use them.

This commit also fixes a bug in availability spec. When a symbol
(op or enum case) can be enabled by an extension, we should drop
it's minimal version requirement. Being enabled by an extension
naturally means the symbol can be used by *any* SPIR-V version
as long as the extension is supported. The grammar still encodes
the 'version' field for such cases, but it should be interpreted
as a different way: rather than meaning a minimal version
requirement, it says the symbol becomes core at that specific
version.

Differential Revision: https://reviews.llvm.org/D72765
2020-01-17 08:01:57 -05:00
..
emacs Update header notices. 2019-03-29 17:43:20 -07:00
spirv [mlir][spirv] Support implied extensions and capabilities 2020-01-17 08:01:57 -05:00
textmate Use simpler highlighting textmate syntax 2019-11-15 09:29:40 -08:00
vim Fix the MLIR Vim syntax file: the keyword group was missing 2019-12-26 04:50:38 +00:00
generate-test-checks.py Adjust License.txt file to use the LLVM license 2019-12-23 15:33:37 -08:00