aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2019-12-26 12:15:26 -0500
committerLei Zhang <antiagainst@google.com>2020-01-17 08:01:57 -0500
commit267483ac709b85906e223c3cac447538a115b4c4 (patch)
treefda17ba01a530f6e675ee048d0424171267dbcac /llvm/lib/CodeGen/ReachingDefAnalysis.cpp
parent37dfc64687a01db1d6e7b362231b0c698d26e257 (diff)
downloadllvm-267483ac709b85906e223c3cac447538a115b4c4.zip
llvm-267483ac709b85906e223c3cac447538a115b4c4.tar.gz
llvm-267483ac709b85906e223c3cac447538a115b4c4.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/ReachingDefAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions