[PATCH] [OPENMP] Codegen for 'firstprivate' clause in 'single' directive.

Alexey Bataev a.bataev at hotmail.com
Thu Apr 23 06:53:08 PDT 2015


Hi rjmccall, hfinkel,

Emit the following code for 'single' directive with 'firtstprivate' clause:
```
if (@__kmpc_single()) {
<init for firstprivates>
@__kmpc_end_single();
}
@__kmpc_cancel_barrier(); // To avoid data race in firstprivate init

```

http://reviews.llvm.org/D9223

Files:
  lib/CodeGen/CGStmtOpenMP.cpp
  test/OpenMP/single_firstprivate_codegen.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9223.24299.patch
Type: text/x-patch
Size: 14116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150423/021a1f0e/attachment.bin>


More information about the cfe-commits mailing list