[PATCH] [OPENMP] Coegen for 'firstprivate' clause in 'sections' directive.

Alexey Bataev a.bataev at hotmail.com
Thu Apr 23 04:21:33 PDT 2015


Hi rjmccall, hfinkel,

If there is 2 or more sections in a 'section' directive the following code is generated:
```
<init for firstprivates>
@__kmpc_cancel_barrier();// To avoid data race in firstprivate init
@__kmpc_for_static_init_4();
<BODY for sections directive>
@__kmpc_for_static_fini()
```

If there is only one section, the following code is generated:
```
if (@__kmpc_single()) {
<init for firstprivates>
@__kmpc_end_single();
}
@__kmpc_cancel_barrier(); // To avoid data race in firstprivate init

```

http://reviews.llvm.org/D9214

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

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


More information about the cfe-commits mailing list