diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-27 19:38:58 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-27 19:38:58 +0000 |
commit | 0b49f9e4893bcf956fa025900855cbd317b55285 (patch) | |
tree | 1a84b64f3016276957f9cc00e6551c64489ac789 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 974acd6b13a319d61f88cf3af81bb237c57ebeef (diff) | |
download | bcm5719-llvm-0b49f9e4893bcf956fa025900855cbd317b55285.tar.gz bcm5719-llvm-0b49f9e4893bcf956fa025900855cbd317b55285.zip |
[OPENMP] Codegen for `distribute parallel for simd` directive.
Initial codegen for `#pragma omp distribute parallel for simd` directive
and its clauses.
llvm-svn: 319079
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 22a36eb0b55..2035a59a82a 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2044,14 +2044,12 @@ void CodeGenFunction::EmitOMPDistributeParallelForDirective( void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective( const OMPDistributeParallelForSimdDirective &S) { + auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) { + CGF.EmitOMPDistributeLoop(S, emitInnerParallelForWhenCombined, + S.getDistInc()); + }; OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); - CGM.getOpenMPRuntime().emitInlinedDirective( - *this, OMPD_distribute_parallel_for_simd, - [&S](CodeGenFunction &CGF, PrePostActionTy &) { - OMPLoopScope PreInitScope(CGF, S); - CGF.EmitStmt( - cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); - }); + CGM.getOpenMPRuntime().emitInlinedDirective(*this, OMPD_distribute, CodeGen); } void CodeGenFunction::EmitOMPDistributeSimdDirective( |