Files
clang-p2996/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.cpp
Markus Böck 19b1e27fcd [mlir][SPIRVToLLVM] Add pass option 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 adds the pass option and required changes to the patterns to support the emission of LLVM IR opaque pointers. Given how close SPIRV semantics are to LLVM IR semantics this boils down to just a few changes:
* Making sure that GEP and alloca are built with the explicit base pointer type
* creating opaque pointers instead of typed pointers if requested
* omitting pointer to pointer bitcasts

Differential Revision: https://reviews.llvm.org/D143900
2023-02-13 22:24:20 +01:00

2.2 KiB