diff options
author | Kelvin Li <kkwli0@gmail.com> | 2016-08-05 14:37:37 +0000 |
---|---|---|
committer | Kelvin Li <kkwli0@gmail.com> | 2016-08-05 14:37:37 +0000 |
commit | 02532876334c3323c26b236761bca6b4cead3c27 (patch) | |
tree | 5324cdc4a4a6726796691a75ebd274772c66b66f /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 24dc1e7a90ee85b33ac103f976bf6ad14097f9bf (diff) | |
download | bcm5719-llvm-02532876334c3323c26b236761bca6b4cead3c27.tar.gz bcm5719-llvm-02532876334c3323c26b236761bca6b4cead3c27.zip |
[OpenMP] Sema and parsing for 'teams distribute' pragma
This patch is to implement sema and parsing for 'teams distribute' pragma.
Differential Revision: https://reviews.llvm.org/D23189
llvm-svn: 277818
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 954721e16a9..f2b99428588 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1934,6 +1934,18 @@ void CodeGenFunction::EmitOMPTargetSimdDirective( }); } +void CodeGenFunction::EmitOMPTeamsDistributeDirective( + const OMPTeamsDistributeDirective &S) { + OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); + CGM.getOpenMPRuntime().emitInlinedDirective( + *this, OMPD_teams_distribute, + [&S](CodeGenFunction &CGF, PrePostActionTy &) { + OMPLoopScope PreInitScope(CGF, S); + CGF.EmitStmt( + cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); + }); +} + /// \brief Emit a helper variable and return corresponding lvalue. static LValue EmitOMPHelperVar(CodeGenFunction &CGF, const DeclRefExpr *Helper) { |