]> granicus.if.org Git - clang/commit
[OPENMP] Codegen for 'omp master' directive
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 4 Dec 2014 07:23:53 +0000 (07:23 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 4 Dec 2014 07:23:53 +0000 (07:23 +0000)
commit528f83c9a59bd64e608db95b26570a8aea3c5ec2
treef431fe5aa73e250717a5229e68582ed8dfd3ca03
parentf514ca8aa824579b46ddecbdebd34315c356505d
[OPENMP] Codegen for 'omp master' directive
Patch adds 2 library functions to OpenMPRuntime class - int32 kmpc_master(ident_t *, int32 gtid) and void kmpc_end_master(ident_t *, int32 gtid);
For 'omp master' directive the next code is generated:

if (__kmpc_master(loc, gtid)) {
    <Associated structured block>;
      __kmpc_end_master(log, gtid);
}

Differential Revision: http://reviews.llvm.org/D6473

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223342 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/master_codegen.cpp [new file with mode: 0644]