llvm-project/clang/tools
Alexey Bataev a63048e4fd [OPENMP] Codegen for 'copyprivate' clause ('single' directive).
If there is at least one 'copyprivate' clause is associated with the single directive, the following code is generated:

```
i32 did_it = 0;                                  \\ for 'copyprivate' clause
if(__kmpc_single(ident_t *, gtid)) {
  SingleOpGen();
  __kmpc_end_single(ident_t *, gtid);
  did_it = 1;                                    \\ for 'copyprivate' clause
}
<copyprivate_list>[0] = &var0;
...
<copyprivate_list>[n] = &varn;
call __kmpc_copyprivate(ident_t *, gtid, <copyprivate_list_size>,
                        <copyprivate_list>, <copy_func>, did_it);

...

void<copy_func>(void *LHSArg, void *RHSArg) {
  Dst = (void * [n])(LHSArg);
  Src = (void * [n])(RHSArg);
  Dst[0] = Src[0];
  ... Dst[n] = Src[n];
}
```
All list items from all 'copyprivate' clauses are gathered into single <copyprivate list> (<copyprivate_list_size> is a size in bytes of this list) and <copy_func> is used to propagate values of private or threadprivate variables from the 'single' region to other implicit threads from outer 'parallel' region.
Differential Revision: http://reviews.llvm.org/D8410

llvm-svn: 232932
2015-03-23 06:18:07 +00:00
..
arcmt-test Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
c-arcmt-test Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
c-index-test Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
clang-check Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
clang-format clang-format: Recognize the .ts (TypeScript) extension as JavaScript. 2015-03-11 14:58:38 +00:00
clang-format-vs Migrate clang-format-vs plugin project to VS 2013 2015-03-03 17:30:50 +00:00
diag-build Briefly document diag-build.sh 2013-12-28 21:59:11 +00:00
diagtool Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
driver Update for llvm api change. 2015-03-20 20:00:30 +00:00
libclang [OPENMP] Codegen for 'copyprivate' clause ('single' directive). 2015-03-23 06:18:07 +00:00
scan-build [analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path> 2015-02-03 06:23:36 +00:00
scan-view [analyzer] scan-view: don't ever serve absolute paths. 2013-04-29 17:23:06 +00:00
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00