diff options
author | Arpith Chacko Jacob <acjacob@us.ibm.com> | 2016-01-26 18:48:41 +0000 |
---|---|---|
committer | Arpith Chacko Jacob <acjacob@us.ibm.com> | 2016-01-26 18:48:41 +0000 |
commit | e955b3d3fe12a05e7639aa336d6945fa9427c0dc (patch) | |
tree | 3423de8c95bccda8edcb7065c05cd525a8acc621 /clang/lib/Parse/ParseOpenMP.cpp | |
parent | 6ac3f739ca4cd90b41388cc50070a6bca85b6842 (diff) | |
download | bcm5719-llvm-e955b3d3fe12a05e7639aa336d6945fa9427c0dc.tar.gz bcm5719-llvm-e955b3d3fe12a05e7639aa336d6945fa9427c0dc.zip |
[OpenMP] Parsing + sema for target parallel directive.
Summary:
This patch adds parsing + sema for the target parallel directive and its clauses along with testcases.
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D16553
Rebased to current trunk and updated test cases.
llvm-svn: 258832
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 28748dcac6b..2fb53d149cd 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -44,7 +44,8 @@ static OpenMPDirectiveKind ParseOpenMPDirectiveKind(Parser &P) { {OMPD_parallel, OMPD_for, OMPD_parallel_for}, {OMPD_parallel_for, OMPD_simd, OMPD_parallel_for_simd}, {OMPD_parallel, OMPD_sections, OMPD_parallel_sections}, - {OMPD_taskloop, OMPD_simd, OMPD_taskloop_simd}}; + {OMPD_taskloop, OMPD_simd, OMPD_taskloop_simd}, + {OMPD_target, OMPD_parallel, OMPD_target_parallel}}; auto Tok = P.getCurToken(); auto DKind = Tok.isAnnotation() @@ -153,6 +154,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_target_data: case OMPD_target_enter_data: case OMPD_target_exit_data: + case OMPD_target_parallel: case OMPD_taskloop: case OMPD_taskloop_simd: case OMPD_distribute: @@ -177,7 +179,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { /// 'barrier' | 'taskwait' | 'flush' | 'ordered' | 'atomic' | /// 'for simd' | 'parallel for simd' | 'target' | 'target data' | /// 'taskgroup' | 'teams' | 'taskloop' | 'taskloop simd' {clause} | -/// 'distribute' | 'target enter data' | 'target exit data' +/// 'distribute' | 'target enter data' | 'target exit data' | +/// 'target parallel' /// annot_pragma_openmp_end /// StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( @@ -259,6 +262,7 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( case OMPD_teams: case OMPD_taskgroup: case OMPD_target_data: + case OMPD_target_parallel: case OMPD_taskloop: case OMPD_taskloop_simd: case OMPD_distribute: { |