[llvm] [mlir] [mlir][openmp] - Fix crash in OpenMPIRBuilder when converting to LLVMIR (PR #84611)

Dominik Adamski via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 06:56:29 PDT 2024


https://github.com/DominikAdamski commented:

I think that an MLIR pass, which operates on LLVM/OpenMP dialects and outlines target regions, is a good idea. I opt for a pass for the LLVM dialect because this dialect will be common for both Fortran and future C/C++ MLIR code. Its main advantage will be the removal of redundant LLVM IR code generation.

Currently, we remove this redundant code in the `convertDeclareTargetAttr` function. We had a discussion about whether this approach is acceptable, and we decided to accept it (see https://reviews.llvm.org/D147641 ). If we remove the original host function, we should also remove the information about planned LLVM IR outlining. Having said that, I tend to accept this patch as a temporary solution.

https://github.com/llvm/llvm-project/pull/84611


More information about the llvm-commits mailing list