3 Commits

Author SHA1 Message Date
tw-ilson
1d5e3b2d65
[mlir][spirv] Use ODS generated attribute names for op definitions (#81552)
Since ODS generates getters functions for SPIRV operations' attribute
names, we replace instances of these hardcoded strings in the SPIR-V
dialect's op parser/printer with function calls for consistency.

Fixes https://github.com/llvm/llvm-project/issues/77627

---------

Co-authored-by: Lei Zhang <antiagainst@gmail.com>
2024-02-25 16:47:25 -08:00
Jakub Kuderski
94189e101c
[mlir][spirv] Implement missing validation rules for ptr variables (#67871)
Variables that point to physical storage buffer require aliasing
decorations. This is specified by the `SPV_KHR_physical_storage_buffer`
extension.

Also add an example of a variable with a decoration attribute.
2023-09-30 00:21:28 -04:00
varconst
81b4e7d2b0 [mlir][spirv] Extract more ops from the main implementation file. NFC.
Continue to work outlined in D155747 and split the main SPIR-V ops
implementation file into a few smaller and quicker to compile files.

Move control flow and memory ops to their own implementation files.
Create new `.cpp` files for tablegened code.

After this change, the `SPIRVOps.cpp` is 2k LoC-long and takes a
reasonable amount of time to compile.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D155883
2023-07-20 17:11:32 -04:00