This patch adds support for translation of the OpenMP barrier construct to LLVM IR. The OpenMP IRBuilder is used for this translation. A new flag (mlir-to-openmpllvmir) is added to invoke this translation.
A new file (ConvertToOpenMPLLVMIR.cpp) is added in lib/Target/LLVMIR. This file contains a ModuleTranslation class which inherits from the LLVM ModuleTranslation class. The class overrides the convertOperation function which is specialised for OpenMP operations. Couple of new functions postLLVMModuleCreation, postLLVMTranslation are added to get the llvmModule for creating an instance of the OpenMP IRBuilder.
The patch includes code changes and a testcase.
Note: This patch requires the under review patch (https://reviews.llvm.org/D72400) by @DavidTruby which adds the barrier construct to the OpenMP dialect.