[mlir] Enable opaque pointers in LLVM conversion passes by default
authorMarkus Böck <markus.boeck02@gmail.com>
Fri, 10 Mar 2023 07:33:21 +0000 (08:33 +0100)
committerMarkus Böck <markus.boeck02@gmail.com>
Fri, 10 Mar 2023 07:46:38 +0000 (08:46 +0100)
commit552522bef66c56dc4336d5948662f295dd733c0d
tree7ca99ddd5c6f3fce88d70d25a1ef70811f11b854
parent7163b1ab8d95905fb7fe4cd1a60102ce57e76ecb
[mlir] Enable opaque pointers in LLVM conversion passes by default

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

When this patch lands any downstream users with custom LLVM conversion passes not yet using opaque pointers will start either experiencing assertions being triggered, null pointer dereferences or at the very least verifier errors. These can be either fixed by switching to opaque pointers or simply disabling opaque pointers in both pass options of any upstream conversion passes and any uses of `LLVMTypeConverter` via the `LowerToLLVMOptions`.

Users using just MLIRs conversion passes to the LLVM Dialect should not experience any change in functionality except when inspecting the output from the passes.

Differential Revision: https://reviews.llvm.org/D145585
flang/lib/Optimizer/CodeGen/TypeConverter.h
mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
mlir/include/mlir/Conversion/Passes.td
mlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir