llvm-project/clang/tools/libclang
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
..
ARCMigrate.cpp Use the simpler version of llvm::sys::fs::exists. 2014-09-11 18:10:13 +00:00
BuildSystem.cpp VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping files 2014-05-20 21:43:27 +00:00
CIndex.cpp [OPENMP] Codegen for 'copyprivate' clause ('single' directive). 2015-03-23 06:18:07 +00:00
CIndexCXX.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
CIndexCodeCompletion.cpp Make helper functions static. NFC. 2015-03-10 18:24:01 +00:00
CIndexDiagnostic.cpp unique_ptrify the diagnostics in CXDiagnosticSetImpl 2014-08-29 18:43:24 +00:00
CIndexDiagnostic.h unique_ptrify the diagnostics in CXDiagnosticSetImpl 2014-08-29 18:43:24 +00:00
CIndexHigh.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
CIndexInclusionStack.cpp Fix a typo in the function name that I just introduced (r201155) 2014-02-11 15:02:48 +00:00
CIndexUSRs.cpp [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.py 2015-01-14 11:23:58 +00:00
CIndexer.cpp libclang: Remove clang::RemapFiles, it's dead code. 2013-06-13 13:57:48 +00:00
CIndexer.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CLog.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CMakeLists.txt Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
CXComment.cpp [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.py 2015-01-14 11:23:58 +00:00
CXComment.h [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.py 2015-01-14 11:23:58 +00:00
CXCompilationDatabase.cpp CompilationDatabase: Sure-up ownership of compilation databases using std::unique_ptr 2014-08-08 16:06:15 +00:00
CXCursor.cpp [libclang] When initializing an ObjC object via the "[[ClassName alloc] init*]" pattern, 2014-11-10 23:21:35 +00:00
CXCursor.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CXLoadedDiagnostic.cpp Add missing include. 2015-03-01 21:36:40 +00:00
CXLoadedDiagnostic.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CXSourceLocation.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
CXSourceLocation.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CXStoredDiagnostic.cpp libclang: remove 'CXDiagnostic_Remark' 2014-04-26 14:43:53 +00:00
CXString.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
CXString.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition. 2015-02-15 22:54:08 +00:00
CXTranslationUnit.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CXType.cpp Cleanup: remove artificial division between lookup results and const lookup 2015-02-21 02:45:19 +00:00
CXType.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
CursorVisitor.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
IndexBody.cpp Objective-C. revert patch for rdar://17554063. 2014-10-28 18:28:16 +00:00
IndexDecl.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
IndexTypeSourceInfo.cpp -ms-extensions: Implement __super scope specifier (PR13236). 2014-09-26 00:28:20 +00:00
Index_Internal.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
Indexing.cpp Update APIs that return a pair of iterators to return an iterator_range instead. 2015-02-06 17:25:10 +00:00
IndexingContext.cpp [C++11] Use 'nullptr'. Tools edition. 2014-06-08 08:38:04 +00:00
IndexingContext.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; Clang edition. 2015-02-15 22:54:08 +00:00
Makefile Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
libclang.exports This reverts commit r227432, r227438 and r227448. 2015-01-29 17:22:53 +00:00