aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-10-21 03:16:40 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-10-21 03:16:40 +0000
commit03b340a3a5608eecf447bdbcb0a3b64714e4efd7 (patch)
tree230ba545e88bcc01901ab44644ff0e79dd2d450b /clang/lib/CodeGen/CodeGenFunction.h
parent322d0df309b5a01612e3a2dbc194e300d2cd5176 (diff)
downloadllvm-03b340a3a5608eecf447bdbcb0a3b64714e4efd7.zip
llvm-03b340a3a5608eecf447bdbcb0a3b64714e4efd7.tar.gz
llvm-03b340a3a5608eecf447bdbcb0a3b64714e4efd7.tar.bz2
[OPENMP] Codegen for 'private' clause in 'parallel' directive.
This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D4752 llvm-svn: 220262
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 49810a8..a31cd1b 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -113,6 +113,7 @@ class CodeGenFunction : public CodeGenTypeCache {
void operator=(const CodeGenFunction &) LLVM_DELETED_FUNCTION;
friend class CGCXXABI;
+ friend class CGOpenMPRegionInfo;
public:
/// A jump destination is an abstract label, branching to which may
/// require a jump out through normal cleanups.
@@ -2012,6 +2013,8 @@ public:
const VarDecl *VDInit);
void EmitOMPFirstprivateClause(const OMPExecutableDirective &D,
OMPPrivateScope &PrivateScope);
+ void EmitOMPPrivateClause(const OMPExecutableDirective &D,
+ OMPPrivateScope &PrivateScope);
void EmitOMPParallelDirective(const OMPParallelDirective &S);
void EmitOMPSimdDirective(const OMPSimdDirective &S);