[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
Loading
Please sign in to comment