summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-03-09 09:49:00 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-03-09 09:49:00 +0000
commit78849fb464ce63bd701e07d607d4c70ceec897f4 (patch)
treefbd3d748b3d41c8ee29e3f59a6424259ef78126e /clang/lib/CodeGen
parent78e3b0e2a9d0c5cc7fb81f0edc7021bc66f17688 (diff)
downloadbcm5719-llvm-78849fb464ce63bd701e07d607d4c70ceec897f4.tar.gz
bcm5719-llvm-78849fb464ce63bd701e07d607d4c70ceec897f4.zip
[OPENMP 4.5] Codegen for data members in 'linear' clause.
OpenMP 4.5 allows to use data members in private clauses. Patch adds codegen support for 'linear' clause. llvm-svn: 263002
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index dfa3b91e11b..211155edd23 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -45,25 +45,10 @@ class OMPLexicalScope {
}
}
- class PostUpdateCleanup final : public EHScopeStack::Cleanup {
- const OMPExecutableDirective &S;
-
- public:
- PostUpdateCleanup(const OMPExecutableDirective &S) : S(S) {}
-
- void Emit(CodeGenFunction &CGF, Flags /*flags*/) override {
- if (!CGF.HaveInsertPoint())
- return;
- (void)S;
- // TODO: add cleanups for clauses that require post update.
- }
- };
-
public:
OMPLexicalScope(CodeGenFunction &CGF, const OMPExecutableDirective &S)
: Scope(CGF, S.getSourceRange()) {
emitPreInitStmt(CGF, S);
- CGF.EHStack.pushCleanup<PostUpdateCleanup>(NormalAndEHCleanup, S);
}
};
} // namespace
@@ -1172,6 +1157,8 @@ static void emitLinearClauseFinal(CodeGenFunction &CGF,
CGF.EmitIgnoredExpr(F);
++IC;
}
+ if (auto *PostUpdate = C->getPostUpdateExpr())
+ EmitIgnoredExpr(PostUpdate);
}
}
OpenPOWER on IntegriCloud