Lowering of OpenMP Parallel operation to LLVM IR 1/n
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Mon, 13 Jul 2020 22:13:04 +0000 (23:13 +0100)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Mon, 13 Jul 2020 22:55:45 +0000 (23:55 +0100)
commitd9067dca7ba7cda97a86ec22106e06ffc700ecbf
tree4a5f8b58d901459b6bf7f9951f1698c2668b0c5f
parent004bf35ba04873dc9ab1408bce0d6f2fed03b0ea
Lowering of OpenMP Parallel operation to LLVM IR 1/n

This patch introduces lowering of the OpenMP parallel operation to LLVM
IR using the OpenMPIRBuilder.

Functions topologicalSort and connectPhiNodes are generalised so that
they work with operations also. connectPhiNodes is also made static.

Lowering works for a parallel region with multiple blocks. Clauses and
arguments of the OpenMP operation are not handled.

Reviewed By: rriddle, anchu-rajendran

Differential Revision: https://reviews.llvm.org/D81660
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
mlir/test/Target/openmp-llvm.mlir