diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-10 14:14:43 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-10 14:14:43 +0000 |
commit | 2a0c4f57dd33c5187ed6d85f2d5be39701fe1692 (patch) | |
tree | 0d2c0769490c3624fa767728ce289609b8e33b41 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 22518632cded2b9cd54ff667174b44fd7549cb9d (diff) | |
download | bcm5719-llvm-2a0c4f57dd33c5187ed6d85f2d5be39701fe1692.tar.gz bcm5719-llvm-2a0c4f57dd33c5187ed6d85f2d5be39701fe1692.zip |
[OPENMP] Add default codegen|tests for 'target parallel for[ simd]'
constructs.
Added default codegen for 'target parallel for' construct + tests for
default codegen of 'target parallel for[ simd]' constructs.
llvm-svn: 315315
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 8d27e11d095..66d248d6ff0 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -4126,7 +4126,14 @@ void CodeGenFunction::EmitOMPTargetParallelDirective( void CodeGenFunction::EmitOMPTargetParallelForDirective( const OMPTargetParallelForDirective &S) { - // TODO: codegen for target parallel for. + OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); + CGM.getOpenMPRuntime().emitInlinedDirective( + *this, OMPD_target_parallel_for, + [&S](CodeGenFunction &CGF, PrePostActionTy &) { + OMPLoopScope PreInitScope(CGF, S); + CGF.EmitStmt( + cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); + }); } /// Emit a helper variable and return corresponding lvalue. |