[PATCH] [OPENMP] Codegen for 'omp master' directive

Alexey Bataev a.bataev at hotmail.com
Mon Dec 1 20:43:25 PST 2014


Hi rjmccall, hfinkel, fraggamuffin, ejstotzer,

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);
}
```

http://reviews.llvm.org/D6473

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGStmtOpenMP.cpp
  test/OpenMP/master_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6473.16796.patch
Type: text/x-patch
Size: 6925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141202/c66da1bf/attachment.bin>


More information about the cfe-commits mailing list