[OpenMP][MLIR] Conversion pattern for OpenMP to LLVM
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 13 Aug 2020 08:03:04 +0000 (09:03 +0100)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 27 Aug 2020 18:32:15 +0000 (19:32 +0100)
commit875074c8a93d71b3e246da4bae983ec7524f4f28
tree946c3e2d548859ebe123b40409a428ded8d20f25
parentd2b845dd6c90508c6258b4023fdf9ab5519fee3f
[OpenMP][MLIR] Conversion pattern for OpenMP to LLVM

Adding a conversion pattern for the parallel Operation. This will
help the conversion of parallel operation with standard dialect to
parallel operation with llvm dialect. The type conversion of the block
arguments in a parallel region are controlled by the pattern for the
parallel Operation. Without this pattern, a parallel Operation with
block arguments cannot be converted from standard to LLVM dialect.
Other OpenMP operations without regions are marked as legal. When
translation of OpenMP operations with regions are added then patterns
for these operations can also be added.
Also uses all the standard to llvm patterns. Patterns of other dialects
can be added later if needed.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D86273
mlir/include/mlir/Conversion/OpenMPToLLVM/ConvertOpenMPToLLVM.h [new file with mode: 0644]
mlir/include/mlir/Conversion/Passes.h
mlir/include/mlir/Conversion/Passes.td
mlir/lib/Conversion/CMakeLists.txt
mlir/lib/Conversion/OpenMPToLLVM/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp [new file with mode: 0644]
mlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir [new file with mode: 0644]