[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder.
authorFady Ghanim <fghanim84@gmail.com>
Sat, 15 Feb 2020 06:42:23 +0000 (00:42 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sat, 15 Feb 2020 07:15:45 +0000 (01:15 -0600)
commit7438059a90326d4fe46377bf1833180333b48fff
tree1f2982ee2f03b2d03e33fb69e4d0ee968ed66d03
parent774971030df946916b11fcdb1691511c3c1e27b7
[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder.

Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.

Also this patch modifies clang to use the new directives when  `-fopenmp-enable-irbuilder` commandline option is passed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D72304
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/test/OpenMP/critical_codegen.cpp
clang/test/OpenMP/master_codegen.cpp
llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/lib/Frontend/OpenMP/OMPConstants.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp