This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Enable opaque pointers in LLVM conversion passes by default
ClosedPublic

Authored by zero9178 on Mar 8 2023, 6:28 AM.

Details

Summary

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.


As was outlined in https://discourse.llvm.org/t/psa-in-tree-conversion-passes-can-now-be-used-with-llvm-opaque-pointers-please-switch-your-downstream-projects/68738, I'd land this patch on Friday with an accompanying PSA as that is exactly two weeks after the initial anncouncement.

Diff Detail