diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-22 21:12:03 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-22 21:12:03 +0000 |
| commit | 16e798873e42656788ccdd29d37e37994b259f33 (patch) | |
| tree | 58d9e6c5239bc527d88331b40eca032958a22c8f /clang/lib/Sema | |
| parent | fd872e963795c0ed3a611801c0ed9cf5500110e6 (diff) | |
| download | bcm5719-llvm-16e798873e42656788ccdd29d37e37994b259f33.tar.gz bcm5719-llvm-16e798873e42656788ccdd29d37e37994b259f33.zip | |
[OPENMP] Add support for cancel constructs in `target teams distribute
parallel for`.
Add support for cancel/cancellation point directives inside `target
teams distribute parallel for` directives.
llvm-svn: 318881
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 939d75bddc6..985cc62df09 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -2593,7 +2593,8 @@ static bool checkNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, (ParentRegion == OMPD_for || ParentRegion == OMPD_parallel_for || ParentRegion == OMPD_target_parallel_for || ParentRegion == OMPD_distribute_parallel_for || - ParentRegion == OMPD_teams_distribute_parallel_for)) || + ParentRegion == OMPD_teams_distribute_parallel_for || + ParentRegion == OMPD_target_teams_distribute_parallel_for)) || (CancelRegion == OMPD_taskgroup && ParentRegion == OMPD_task) || (CancelRegion == OMPD_sections && (ParentRegion == OMPD_section || ParentRegion == OMPD_sections || @@ -7324,7 +7325,8 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective( getCurFunction()->setHasBranchProtectedScope(); return OMPTargetTeamsDistributeParallelForDirective::Create( - Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); + Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, + DSAStack->isCancelRegion()); } StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective( |

