diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-04 15:38:33 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-04 15:38:33 +0000 |
commit | 617db5f822b47ba08d89dcdd4c1229cd26d2ee89 (patch) | |
tree | 070370a3ffc3aef1c9bad410d4d13426f12ed77c /clang/lib/Sema/SemaOpenMP.cpp | |
parent | 987b2c99668f5519efcf370fd10adcfa051bfb3b (diff) | |
download | bcm5719-llvm-617db5f822b47ba08d89dcdd4c1229cd26d2ee89.tar.gz bcm5719-llvm-617db5f822b47ba08d89dcdd4c1229cd26d2ee89.zip |
[OPENMP] Codegen for `distribute simd` directive.
Initial codegen support for `distribute simd` directive.
llvm-svn: 319661
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 2a7e2f1da49..4c0fa7e6172 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -6887,14 +6887,24 @@ StmtResult Sema::ActOnOpenMPDistributeSimdDirective( // The point of exit cannot be a branch out of the structured block. // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); + for (int ThisCaptureLevel = getOpenMPCaptureLevels(OMPD_distribute_simd); + ThisCaptureLevel > 1; --ThisCaptureLevel) { + CS = cast<CapturedStmt>(CS->getCapturedStmt()); + // 1.2.2 OpenMP Language Terminology + // Structured block - An executable statement with a single entry at the + // top and a single exit at the bottom. + // The point of exit cannot be a branch out of the structured block. + // longjmp() and throw() must not violate the entry/exit criteria. + CS->getCapturedDecl()->setNothrow(); + } OMPLoopDirective::HelperExprs B; // In presence of clause 'collapse' with number of loops, it will // define the nested loops number. unsigned NestedLoopCount = CheckOpenMPLoop(OMPD_distribute_simd, getCollapseNumberExpr(Clauses), - nullptr /*ordered not a clause on distribute*/, AStmt, - *this, *DSAStack, VarsWithImplicitDSA, B); + nullptr /*ordered not a clause on distribute*/, CS, *this, + *DSAStack, VarsWithImplicitDSA, B); if (NestedLoopCount == 0) return StmtError(); |