summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmtOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-11-16 18:20:21 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-11-16 18:20:21 +0000
commit2139ed638b7c14eff603ba6b3a67753fe5020063 (patch)
treed41fdf43b1c8c1a65525f06aed142529f690b49f /clang/lib/CodeGen/CGStmtOpenMP.cpp
parent67b4966ccde125ad1b80971369ebaf71628a5955 (diff)
downloadbcm5719-llvm-2139ed638b7c14eff603ba6b3a67753fe5020063.tar.gz
bcm5719-llvm-2139ed638b7c14eff603ba6b3a67753fe5020063.zip
[OPENMP] Add support for cancelling inside target parallel for
directive. Added missed support for cancelling of target parallel for construct. llvm-svn: 318434
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index b7a01390c3a..873c7525830 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -3794,7 +3794,7 @@ void CodeGenFunction::EmitOMPTeamsDirective(const OMPTeamsDirective &S) {
CGF.EmitStmt(cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt());
CGF.EmitOMPReductionClauseFinal(S, /*ReductionKind=*/OMPD_teams);
};
- emitCommonOMPTeamsDirective(*this, S, OMPD_teams, CodeGen);
+ emitCommonOMPTeamsDirective(*this, S, OMPD_distribute, CodeGen);
emitPostUpdateForReductionClause(
*this, S, [](CodeGenFunction &) -> llvm::Value * { return nullptr; });
}
@@ -4128,6 +4128,8 @@ static void emitTargetParallelForRegion(CodeGenFunction &CGF,
// Emit directive as a combined directive that consists of two implicit
// directives: 'parallel' with 'for' directive.
auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
+ CodeGenFunction::OMPCancelStackRAII CancelRegion(
+ CGF, OMPD_target_parallel_for, S.hasCancel());
CGF.EmitOMPWorksharingLoop(S, S.getEnsureUpperBound(), emitForLoopBounds,
emitDispatchForLoopBounds);
};
OpenPOWER on IntegriCloud