[mlir][Vector] add pass option to `convert-vector-to-llvm` to emit opaque pointers
authorMarkus Böck <markus.boeck02@gmail.com>
Sun, 12 Feb 2023 20:05:53 +0000 (21:05 +0100)
committerMarkus Böck <markus.boeck02@gmail.com>
Mon, 13 Feb 2023 10:49:20 +0000 (11:49 +0100)
commit4a2d4588a041c4632e0d24cf21b01bb5d939266b
treed333a509bac4da6d071a4f731a0f765f34ee5b44
parentd5ea1b22cba345e4fc0d42085a8c366407c7265b
[mlir][Vector] add pass option to `convert-vector-to-llvm` to emit opaque pointers

Part of https://discourse.llvm.org/t/rfc-switching-the-llvm-dialect-and-dialect-lowerings-to-opaque-pointers/68179

This patch allows the use of `convert-vector-to-llvm` with LLVM opaque pointer types. The changes required were relatively minor:
* there were a few GEPs and loads that required specifying the result or base type
* a few bitcasts, especially when interacting with memref have to not be emitted when using opaque pointers

Differential Revision: https://reviews.llvm.org/D143853
mlir/include/mlir/Conversion/Passes.td
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
mlir/test/Conversion/VectorToLLVM/typed-pointers.mlir [new file with mode: 0644]
mlir/test/Conversion/VectorToLLVM/vector-mask-to-llvm.mlir
mlir/test/Conversion/VectorToLLVM/vector-reduction-to-llvm.mlir
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir