[PATCH] D72962: [MLIR, OpenMP] Translation of OpenMP barrier construct to LLVM IR

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 10:15:40 PST 2020


kiranchandramohan added a comment.

In D72962#1872562 <https://reviews.llvm.org/D72962#1872562>, @compiler_developer wrote:

>


Thanks for your comments.

> **MLIROpenMP** and **LLVMFrontendOpenMP** libraries looks like ** an additional dependency for MLIR users who wants LLVM lowering and doesn't want anything to do with the OpenMP**! I think Toy example cmake file changes is one of the early symptoms.

One way to handle that would be to go back to the first version of this patch which implements translation by deriving from  public LLVM::ModuleTranslation.

> Can't OpenMP dialect have a separate LLVM dialect lowering similar to all other dialects in MLIR? I think it makes sense to lower OpenMP constructs in LLVM dialect rather than having a OpenMPIRBuilder based on LLVM IR.

We decided to use the OpenMPIRBuilder since that way we will be able to reuse existing code in the llvm-project (clang) for OpenMP code generation.

> What happens in case of LLM IR + OpenMP to LLVM dialect conversion? OpenMP dialect will be created too? Or else the LLVM IR to/from LLVM dialect (+ OpenMP dialect) will behave differently!

I believe we can support this option under a flag. With the flag OpenMP + LLVM dialect is created. Without the flag only LLVM dialect will be created.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72962/new/

https://reviews.llvm.org/D72962





More information about the llvm-commits mailing list