Commit Graph

5 Commits

Author SHA1 Message Date
River Riddle b54c724be0 [mlir:OpConversionPattern] Add overloads for taking an Adaptor instead of ArrayRef
This has been a TODO for a long time, and it brings about many advantages (namely nice accessors, and less fragile code). The existing overloads that accept ArrayRef are now treated as deprecated and will be removed in a followup (after a small grace period). Most of the upstream MLIR usages have been fixed by this commit, the rest will be handled in a followup.

Differential Revision: https://reviews.llvm.org/D110293
2021-09-24 17:51:41 +00:00
Lei Zhang 0065bd2ad5 [mlir][spirv] Fix loading bool with proper storage capabilities
If the source value to load is bool, and we have native storage
capability support for the source bitwidth, we still cannot directly
rewrite uses; we need to perform casting to bool first.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107119
2021-07-30 18:06:11 -04:00
Lei Zhang 9f5300c8be [mlir][spirv] Fix storing bool with proper storage capabilities
If the source value to store is bool, and we have native storage
capability support for the target bitwidth, we still cannot directly
store; we need to perform casting to match the target memref
element's bitwidth.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107114
2021-07-30 18:06:10 -04:00
Butygin 1e9799e204 [mlir][spirv] Fix crash in convert-gpu-to-spirv pass with memrefs with affine maps
spirv::getElementPtr can return null (for memrefs with affine map) but patterns didn't handle this.

Differential Revision: https://reviews.llvm.org/D106988
2021-07-30 12:46:13 +03:00
Lei Zhang 26be7fe27c [mlir] NFC: split MemRef to SPIR-V conversion into their own files
Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107094
2021-07-29 16:34:10 -04:00