[PATCH] D122255: Meta directive runtime support
Abid via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 07:24:57 PDT 2022
abidmalikwaterloo updated this revision to Diff 422512.
abidmalikwaterloo added a comment.
Added tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122255/new/
https://reviews.llvm.org/D122255
Files:
clang/test/OpenMP/metadirective_ast_print2.c
clang/test/OpenMP/metadirective_ast_print3.c
clang/test/OpenMP/metadirective_ast_print4.c
clang/test/OpenMP/metadirective_ast_print_new1.c
clang/test/OpenMP/metadirective_ast_print_new2.c
clang/test/OpenMP/metadirective_ast_print_new3.c
Index: clang/test/OpenMP/metadirective_ast_print4.c
===================================================================
--- /dev/null
+++ clang/test/OpenMP/metadirective_ast_print4.c
@@ -1,23 +0,0 @@
-// RUN: %clang_cc1 -verify -fopenmp -ast-print %s -o - | FileCheck %s
-// expected-no-diagnostics
-
-int main() {
- int N = 15;
-#pragma omp metadirective when(user = {condition(N > 10)} : parallel for)\
- default(target teams)
- for (int i = 0; i < N; i++)
- ;
-
-
-#pragma omp metadirective when(device = {arch("nvptx64")}, user = {condition(N >= 100)} : parallel for)\
- default(target parallel for)
- for (int i = 0; i < N; i++)
- ;
- return 0;
-}
-
-
-
-// CHECK: #pragma omp metadirective when(user={condition(N > 10)}: parallel for) default(target teams)
-// CHECK: #pragma omp metadirective when(device={arch(nvptx64)}, user={condition(N >= 100)}: parallel for) default(target parallel for)
-
Index: clang/test/OpenMP/metadirective_ast_print3.c
===================================================================
--- /dev/null
+++ clang/test/OpenMP/metadirective_ast_print3.c
@@ -1,29 +0,0 @@
-// RUN: %clang_cc1 -verify -fopenmp -ast-print %s -o - | FileCheck %s
-// expected-no-diagnostics
-
-void bar(){
- int i=0;
-}
-
-void myfoo(void){
-
- int N = 13;
- int b,n;
- int a[100];
-
-
- #pragma omp metadirective when (user = {condition(N>10)}: target teams distribute parallel for ) \
- when (user = {condition(N==10)}: parallel for )\
- when (user = {condition(N==13)}: parallel for simd) \
- when ( device={arch("arm")}: target teams num_teams(512) thread_limit(32))\
- when ( device={arch("nvptx")}: target teams num_teams(512) thread_limit(32))\
- default ( parallel for)\
-
- { for (int i = 0; i < N; i++)
- bar();
- }
-}
-
-// CHECK: bar()
-// CHECK: myfoo
-// CHECK: #pragma omp metadirective when(user={condition(N > 10)}: target teams distribute parallel for) when(user={condition(N == 13)}: parallel for simd) when(device={arch(nvptx)}: target teams)
Index: clang/test/OpenMP/metadirective_ast_print2.c
===================================================================
--- /dev/null
+++ clang/test/OpenMP/metadirective_ast_print2.c
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -verify -fopenmp -ast-print %s -o - | FileCheck %s
-// expected-no-diagnostics
-void bar(){
- int i=0;
-}
-
-void myfoo(void){
-
- int N = 13;
- int b,n;
- int a[100];
-
- #pragma omp metadirective when(user={condition(N>10)}: target teams ) default(parallel for)
- for (int i = 0; i < N; i++)
- bar();
-
-}
-
-// CHECK: void bar()
-// CHECK: #pragma omp metadirective when(user={condition(N > 10)}: target teams) default(parallel for)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122255.422512.patch
Type: text/x-patch
Size: 2749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220413/90871109/attachment.bin>
More information about the llvm-commits
mailing list