diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-30 11:36:16 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-30 11:36:16 +0000 |
commit | 7bda3ec414cd8edaaa06f8f89e89c49adf57baea (patch) | |
tree | f76fde04bd5c5e57105cc167d40ffb131e1f8da4 /test/OpenMP/for_ast_print.cpp | |
parent | 4354e02b6b9cc0d7b5bc389f66199aeccf13acfc (diff) |
[OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_ast_print.cpp')
-rw-r--r-- | test/OpenMP/for_ast_print.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/OpenMP/for_ast_print.cpp b/test/OpenMP/for_ast_print.cpp index c482ec56b9..d87cece176 100644 --- a/test/OpenMP/for_ast_print.cpp +++ b/test/OpenMP/for_ast_print.cpp @@ -20,7 +20,12 @@ T tmain(T argc) { // CHECK-NEXT: for (int i = 0; i < 2; ++i) // CHECK-NEXT: a = 2; #pragma omp parallel -#pragma omp for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered nowait +#pragma omp for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered(N) nowait + for (int i = 0; i < 10; ++i) + for (int j = 0; j < 10; ++j) + for (int j = 0; j < 10; ++j) + for (int j = 0; j < 10; ++j) + for (int j = 0; j < 10; ++j) for (int i = 0; i < 10; ++i) for (int j = 0; j < 10; ++j) for (int j = 0; j < 10; ++j) @@ -28,7 +33,12 @@ T tmain(T argc) { for (int j = 0; j < 10; ++j) foo(); // CHECK-NEXT: #pragma omp parallel - // CHECK-NEXT: #pragma omp for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered nowait + // CHECK-NEXT: #pragma omp for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered(N) nowait + // CHECK-NEXT: for (int i = 0; i < 10; ++i) + // CHECK-NEXT: for (int j = 0; j < 10; ++j) + // CHECK-NEXT: for (int j = 0; j < 10; ++j) + // CHECK-NEXT: for (int j = 0; j < 10; ++j) + // CHECK-NEXT: for (int j = 0; j < 10; ++j) // CHECK-NEXT: for (int i = 0; i < 10; ++i) // CHECK-NEXT: for (int j = 0; j < 10; ++j) // CHECK-NEXT: for (int j = 0; j < 10; ++j) |