diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-03-03 16:20:23 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-03-03 16:20:23 +0000 |
commit | b68e2db8f9d03e804e0dc59e1aefc9796d7199dd (patch) | |
tree | 7a8f445e6d6bf2afd3f11b222c088772f0486acb /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | b840a6d6f40bc487865f32a87a7e092326029e2c (diff) | |
download | bcm5719-llvm-b68e2db8f9d03e804e0dc59e1aefc9796d7199dd.tar.gz bcm5719-llvm-b68e2db8f9d03e804e0dc59e1aefc9796d7199dd.zip |
[OpenMP] Code generation for teams - kernel launching
Summary:
This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive.
The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch.
Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev
Subscribers: cfe-commits, caomhin, fraggamuffin
Differential Revision: http://reviews.llvm.org/D17019
llvm-svn: 262625
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index ddceb1b559c..7f4e19577ab 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2716,8 +2716,12 @@ void CodeGenFunction::EmitOMPTargetDirective(const OMPTargetDirective &S) { CapturedVars); } -void CodeGenFunction::EmitOMPTeamsDirective(const OMPTeamsDirective &) { - llvm_unreachable("CodeGen for 'omp teams' is not supported yet."); +void CodeGenFunction::EmitOMPTeamsDirective(const OMPTeamsDirective &S) { + OMPLexicalScope Scope(*this, S); + const CapturedStmt &CS = *cast<CapturedStmt>(S.getAssociatedStmt()); + + // FIXME: We should fork teams here instead of just emit the statement. + EmitStmt(CS.getCapturedStmt()); } void CodeGenFunction::EmitOMPCancellationPointDirective( |