[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-29 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam closed 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-28 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur approved this pull request.

LGTM, thanks.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-28 Thread Michael Klemm via cfe-commits

https://github.com/mjklemm approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-28 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

@mjklemm @Meinersbur any more things to add? thanks.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -1,46 +1,89 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,dev5 
-fopenmp -fopenmp-version=50 -fopenmp-is-target-device 
-fopenmp-targets=x86_64-apple-macos10.7.0 -aux-triple x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-is-target-device -fopenmp-targets=x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp-version=45 -fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -DTESTEND=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -I%S/Inputs -DTESTENDINC=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp52 
-fopenmp -fopenmp-version=52 -DVERBOSE_MODE=1 -fnoopenmp-use-tls -ferror-limit 
100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5 
-fopenmp -fopenmp-version=50 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-#pragma omp end declare target // expected-error {{unexpected OpenMP directive 
'#pragma omp end declare target'}}
-
-int a, b, z; // omp5-error {{variable captured in declare target region must 
appear in a to clause}} // omp51-error {{variable captured in declare target 
region must appear in a to clause}} omp52-error {{variable captured in declare 
target region must appear in a to clause}}
-__thread int t; // expected-note {{defined as threadprivate or thread local}}
-
-#pragma omp declare target . // expected-error {{expected '(' after 'declare 
target'}}
+// DEFINE: %{common_opts_mac} = -triple x86_64-apple-macos10.7.0
+// DEFINE: %{limit} = -fnoopenmp-use-tls -ferror-limit 100 
+// DEFINE: %{target_mac} = -fopenmp-targets=x86_64-apple-macos10.7.0
+// DEFINE: %{aux_triple} = -aux-triple x86_64-apple-macos10.7.0
+// DEFINE: %{openmp45} = -fopenmp -fopenmp-version=45
+// DEFINE: %{openmp50} = -fopenmp -fopenmp-version=50
+// DEFINE: %{openmp60} = -fopenmp -fopenmp-version=60
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp45,omp45-to-51,omp45-to-51-var,omp45-to-51-clause,omp45-to-51-clause
  %{openmp45} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
  %{openmp50} %{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var  %{openmp60} 
%{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51,dev5
  %{openmp50} -fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o 
- %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
-fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o - %s
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 -fopenmp-simd -fopenmp-version=50 %{target_mac} %{limit} -o - %s

Meinersbur wrote:

If doing this, then consistently for all of them

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -1,46 +1,89 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,dev5 
-fopenmp -fopenmp-version=50 -fopenmp-is-target-device 
-fopenmp-targets=x86_64-apple-macos10.7.0 -aux-triple x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-is-target-device -fopenmp-targets=x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp-version=45 -fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -DTESTEND=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -I%S/Inputs -DTESTENDINC=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp52 
-fopenmp -fopenmp-version=52 -DVERBOSE_MODE=1 -fnoopenmp-use-tls -ferror-limit 
100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5 
-fopenmp -fopenmp-version=50 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-#pragma omp end declare target // expected-error {{unexpected OpenMP directive 
'#pragma omp end declare target'}}
-
-int a, b, z; // omp5-error {{variable captured in declare target region must 
appear in a to clause}} // omp51-error {{variable captured in declare target 
region must appear in a to clause}} omp52-error {{variable captured in declare 
target region must appear in a to clause}}
-__thread int t; // expected-note {{defined as threadprivate or thread local}}
-
-#pragma omp declare target . // expected-error {{expected '(' after 'declare 
target'}}
+// DEFINE: %{common_opts_mac} = -triple x86_64-apple-macos10.7.0
+// DEFINE: %{limit} = -fnoopenmp-use-tls -ferror-limit 100 
+// DEFINE: %{target_mac} = -fopenmp-targets=x86_64-apple-macos10.7.0
+// DEFINE: %{aux_triple} = -aux-triple x86_64-apple-macos10.7.0
+// DEFINE: %{openmp45} = -fopenmp -fopenmp-version=45
+// DEFINE: %{openmp50} = -fopenmp -fopenmp-version=50
+// DEFINE: %{openmp60} = -fopenmp -fopenmp-version=60
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp45,omp45-to-51,omp45-to-51-var,omp45-to-51-clause,omp45-to-51-clause
  %{openmp45} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
  %{openmp50} %{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var  %{openmp60} 
%{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51,dev5
  %{openmp50} -fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o 
- %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
-fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o - %s
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 -fopenmp-simd -fopenmp-version=50 %{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var -fopenmp-simd 
-fopenmp-version=60 %{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-cla

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -254,4 +256,3 @@ int main(int argc, char **argv) {
   foomain(argc,argv); // expected-note {{n instantiation of function 
template specialization 'foomain' requested here}}
   return 0;
 }
-

Meinersbur wrote:

[nit] unrelated change

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -1,46 +1,89 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,dev5 
-fopenmp -fopenmp-version=50 -fopenmp-is-target-device 
-fopenmp-targets=x86_64-apple-macos10.7.0 -aux-triple x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-targets=x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 
-o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 
-verify=expected,omp5,host5 -fopenmp-simd -fopenmp-version=50 
-fopenmp-is-target-device -fopenmp-targets=x86_64-apple-macos10.7.0 
-fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 
-fopenmp-version=45 -fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -DTESTEND=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -I%S/Inputs -DTESTENDINC=1 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp52 
-fopenmp -fopenmp-version=52 -DVERBOSE_MODE=1 -fnoopenmp-use-tls -ferror-limit 
100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5 
-fopenmp -fopenmp-version=50 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
-#pragma omp end declare target // expected-error {{unexpected OpenMP directive 
'#pragma omp end declare target'}}
-
-int a, b, z; // omp5-error {{variable captured in declare target region must 
appear in a to clause}} // omp51-error {{variable captured in declare target 
region must appear in a to clause}} omp52-error {{variable captured in declare 
target region must appear in a to clause}}
-__thread int t; // expected-note {{defined as threadprivate or thread local}}
-
-#pragma omp declare target . // expected-error {{expected '(' after 'declare 
target'}}
+// DEFINE: %{common_opts_mac} = -triple x86_64-apple-macos10.7.0
+// DEFINE: %{limit} = -fnoopenmp-use-tls -ferror-limit 100 
+// DEFINE: %{target_mac} = -fopenmp-targets=x86_64-apple-macos10.7.0
+// DEFINE: %{aux_triple} = -aux-triple x86_64-apple-macos10.7.0
+// DEFINE: %{openmp45} = -fopenmp -fopenmp-version=45
+// DEFINE: %{openmp50} = -fopenmp -fopenmp-version=50
+// DEFINE: %{openmp60} = -fopenmp -fopenmp-version=60
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp45,omp45-to-51,omp45-to-51-var,omp45-to-51-clause,omp45-to-51-clause
  %{openmp45} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
  %{openmp50} %{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var  %{openmp60} 
%{target_mac} %{limit} -o - %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51,dev5
  %{openmp50} -fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o 
- %s
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
-fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o - %s
+
+// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 -fopenmp-simd -fopenmp-version=50 %{target_mac} %{limit} -o - %s

Meinersbur wrote:

```suggestion
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 %{openmp50_simd} %{target_mac} %{limit} -o - %s
```

https://github.com/llvm/l

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Saiyedul Islam via cfe-commits

https://github.com/saiislam approved this pull request.

Thank you for sticking up with this patch @zahiraam.
It mostly looks ok to me, but please wait for @mjklemm and @Meinersbur reviews.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -205,77 +262,134 @@ namespace {
 }
 #pragma omp end declare target
 
-#pragma omp declare target link(S) // expected-error {{'S' used in declare 
target directive is not a variable or a function name}}
+// expected-error@+1 {{'S' used in declare target directive is not a variable 
or a function name}}
+#pragma omp declare target link(S) 
 
-#pragma omp declare target (x, x) // expected-error {{'x' appears multiple 
times in clauses on the same declare target directive}}
-#pragma omp declare target to(x) to(x) // omp45-error {{'x' appears multiple 
times in clauses on the same declare target directive}} omp5-error {{'x' 
appears multiple times in clauses on the same declare target directive}} 
omp51-error {{'x' appears multiple times in clauses on the same declare target 
directive}} omp52-error {{unexpected 'to' clause, use 'enter' instead}} 
omp52-error {{expected at least one 'enter', 'link' or 'indirect' clause}}
-#pragma omp declare target link(x) // expected-error {{'x' must not appear in 
both clauses 'to' and 'link'}}
+// expected-error@+1 {{'x' appears multiple times in clauses on the same 
declare target directive}}
+#pragma omp declare target (x, x) 
+// omp52-error@+3 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+2 {{expected at least one 'enter', 'link' or 'indirect' 
clause}}
+// omp45-to-51-clause-error@+1 {{'x' appears multiple times in clauses on the 
same declare target directive}}
+#pragma omp declare target to(x) to(x)
+// expected-error@+1 {{'x' must not appear in both clauses 'to' and 'link'}}
+#pragma omp declare target link(x) 
 
 void bazz() {}
-#pragma omp declare target to(bazz) device_type(nohost) // omp45-error 
{{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} 
host5-note 3{{marked as 'device_type(nohost)' here}} omp52-error {{unexpected 
'to' clause, use 'enter' instead}} omp52-error {{expected at least one 'enter', 
'link' or 'indirect' clause}}
+// omp52-error@+4 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+3 {{expected at least one 'enter', 'link' or 'indirect' 
clause}}
+// host5-note@+2 3 {{marked as 'device_type(nohost)' here}}
+// omp45-error@+1 {{unexpected 'device_type' clause, only 'to' or 'link' 
clauses expected}} 
+#pragma omp declare target to(bazz) device_type(nohost)
 void bazzz() {bazz();}
-#pragma omp declare target to(bazzz) device_type(nohost) // omp45-error 
{{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} 
omp52-error {{unexpected 'to' clause, use 'enter' instead}} omp52-error 
{{expected at least one 'enter', 'link' or 'indirect' clause}}
-void any() {bazz();} // host5-error {{function with 'device_type(nohost)' is 
not available on host}}
-void host1() {bazz();} // host5-error {{function with 'device_type(nohost)' is 
not available on host}}
-#pragma omp declare target to(host1) device_type(host) // omp45-error 
{{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} 
dev5-note 3 {{marked as 'device_type(host)' here}} omp52-error {{unexpected 
'to' clause, use 'enter' instead}} omp52-error {{expected at least one 'enter', 
'link' or 'indirect' clause}}
-void host2() {bazz();} //host5-error {{function with 'device_type(nohost)' is 
not available on host}}
-#pragma omp declare target to(host2) // omp52-error {{unexpected 'to' clause, 
use 'enter' instead}} omp52-error {{expected at least one 'enter', 'link' or 
'indirect' clause}}
-void device() {host1();} // dev5-error {{function with 'device_type(host)' is 
not available on device}}
-#pragma omp declare target to(device) device_type(nohost) // omp45-error 
{{unexpected 'device_type' clause, only 'to' or 'link' clauses expected}} 
host5-note 2 {{marked as 'device_type(nohost)' here}} omp52-error {{unexpected 
'to' clause, use 'enter' instead}} omp52-error {{expected at least one 'enter', 
'link' or 'indirect' clause}}
+// omp52-error@+3 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+2 {{expected at least one 'enter', 'link' or 'indirect' 
clause}}
+// omp45-error@+1 {{unexpected 'device_type' clause, only 'to' or 'link' 
clauses expected}}
+#pragma omp declare target to(bazzz) device_type(nohost) 
+// host5-error@+1 {{function with 'device_type(nohost)' is not available on 
host}}
+void any() {bazz();} 
+// host5-error@+1 {{function with 'device_type(nohost)' is not available on 
host}}
+void host1() {bazz();}
+// omp52-error@+4 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+3 {{expected at least one 'enter', 'link' or 'indirect' 
clause}}
+// dev5-note@+2 3 {{marked as 'device_type(host)' here}}
+// omp45-error@+1 {{unexpected 'device_type' clause, only 'to' or 'link' 
clauses expected}}
+#pragma omp declare target to(host1) device_type(host)
+//host5-error@+1 {{function with 'device_type(nohost)' is not available on 
host}}
+void host2() {bazz();}
+// omp52-error@+2 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+1 {{expected

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur commented:

Some nitpicks left. I will LGTM this after you applied them and nobody else has 
remarks.

Converting all the lines to `@+` syntax would not have been necessary, only 
those you needed to change. I think it has become a lot more maintainable now. 
For prefix names, I have no better suggestion.

I'd sign off using `// DEFINE:` as well, but don't require it.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -68,15 +70,21 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
+#ifndef OMP60
 #pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#endif
   {}
+#ifndef OMP60
 #pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#endif
   {}
-#pragma omp target map(mapper(aa) :vv)  // 
expected-error {{missing map type}}
+#ifndef OMP60
+#pragma omp target map(mapper(aa) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}}
   {}
-#pragma omp target map(mapper(aa) to:d) // 
expected-error {{mapper type must be of struct, union or class type}} 
omp52-error{{missing ',' after map type modifier}}
+#endif
+#pragma omp target map(mapper(aa) to:d) // 
expected-error {{mapper type must be of struct, union or class type}} 
omp52-error{{missing ',' after map type modifier}} omp60-error{{missing ',' 
after map type modifier}} omp60-simd-error{{missing ',' after map type 
modifier}}
   {}
-#pragma omp target map(mapper(aa) to:vv) map(close mapper(aa) from:v1) 
map(mapper(aa) to:arr[0]) // omp52-error 4 {{missing ',' after map type 
modifier}}
+#pragma omp target map(mapper(aa) to:vv) map(close mapper(aa) from:v1) 
map(mapper(aa) to:arr[0]) // omp52-error 4 {{missing ',' after map type 
modifier}} omp60-error 4 {{missing ',' after map type modifier}} 
omp60-simd-error 4 {{missing ',' after map type modifier}}

Meinersbur wrote:

```suggestion
// omp52-error@+3 4 {{missing ',' after map type modifier}}
// omp60-error@+2 4 {{missing ',' after map type modifier}}
// omp60-simd-error@+1 4 {{missing ',' after map type modifier}}
#pragma omp target map(mapper(aa) to:vv) map(close mapper(aa) from:v1) 
map(mapper(aa) to:arr[0]) 
```

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -205,77 +262,134 @@ namespace {
 }
 #pragma omp end declare target
 
-#pragma omp declare target link(S) // expected-error {{'S' used in declare 
target directive is not a variable or a function name}}
+// expected-error@+1 {{'S' used in declare target directive is not a variable 
or a function name}}
+#pragma omp declare target link(S) 
 
-#pragma omp declare target (x, x) // expected-error {{'x' appears multiple 
times in clauses on the same declare target directive}}
-#pragma omp declare target to(x) to(x) // omp45-error {{'x' appears multiple 
times in clauses on the same declare target directive}} omp5-error {{'x' 
appears multiple times in clauses on the same declare target directive}} 
omp51-error {{'x' appears multiple times in clauses on the same declare target 
directive}} omp52-error {{unexpected 'to' clause, use 'enter' instead}} 
omp52-error {{expected at least one 'enter', 'link' or 'indirect' clause}}
-#pragma omp declare target link(x) // expected-error {{'x' must not appear in 
both clauses 'to' and 'link'}}
+// expected-error@+1 {{'x' appears multiple times in clauses on the same 
declare target directive}}
+#pragma omp declare target (x, x) 
+// omp52-error@+3 {{unexpected 'to' clause, use 'enter' instead}}
+// omp52-error@+2 {{expected at least one 'enter', 'link' or 'indirect' 
clause}}
+// omp45-to-51-clause-error@+1 {{'x' appears multiple times in clauses on the 
same declare target directive}}

Meinersbur wrote:

So much better 👍

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -68,15 +70,21 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
+#ifndef OMP60
 #pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#endif
   {}
+#ifndef OMP60
 #pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#endif
   {}
-#pragma omp target map(mapper(aa) :vv)  // 
expected-error {{missing map type}}
+#ifndef OMP60
+#pragma omp target map(mapper(aa) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}}
   {}
-#pragma omp target map(mapper(aa) to:d) // 
expected-error {{mapper type must be of struct, union or class type}} 
omp52-error{{missing ',' after map type modifier}}
+#endif
+#pragma omp target map(mapper(aa) to:d) // 
expected-error {{mapper type must be of struct, union or class type}} 
omp52-error{{missing ',' after map type modifier}} omp60-error{{missing ',' 
after map type modifier}} omp60-simd-error{{missing ',' after map type 
modifier}}

Meinersbur wrote:

```suggestion
// expected-error@+4 {{mapper type must be of struct, union or class type}} 
// omp52-error@+3 {{missing ',' after map type modifier}} 
// omp60-error@+2 {{missing ',' after map type modifier}} 
// omp60-simd-error@+1 {{missing ',' after map type modifier}}
#pragma omp target map(mapper(aa) to:d)
```

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Michael Kruse via cfe-commits


@@ -124,4 +124,3 @@ target *S1 = &S;
 // CHECK-NEXT: #pragma omp declare target
 // CHECK-NEXT: target *S1 = &S;
 // CHECK-NEXT: #pragma omp end declare target
-

Meinersbur wrote:

[nit] unrelated change

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-27 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

ping @mjklemm.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-22 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> Yes, I think that would be helpful. Also, avoid duplicating lines with 
> multiple `-verify=` prefixes.

I have made an attempt to edit the 2 LIT tests. I had a hard time finding good 
names for the `verify` prefixes. Please don't hesitate to suggest better ones.
We could also use some `DEFINE` lines for even more readability.  
`declare_target_messages.cpp` would become something like this:
```// DEFINE: %{common_opts_mac} = -triple x86_64-apple-macos10.7.0
// DEFINE: %{limit} = -fnoopenmp-use-tls -ferror-limit 100 
// DEFINE: %{target_mac} = -fopenmp-targets=x86_64-apple-macos10.7.0
// DEFINE: %{aux_triple} = -aux-triple x86_64-apple-macos10.7.0
// DEFINE: %{openmp45} = -fopenmp -fopenmp-version=45
// DEFINE: %{openmp50} = -fopenmp -fopenmp-version=50
// DEFINE: %{openmp60} = -fopenmp -fopenmp-version=60

// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp45,omp45-to-51,omp45-to-51-var,omp45-to-51-clause,omp45-to-51-clause
  %{openmp45} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
  %{openmp50} %{target_mac} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var  %{openmp60} 
%{target_mac} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51,dev5
  %{openmp50} -fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o 
- %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
-fopenmp-is-target-device %{target_mac} %{aux_triple} %{limit} -o - %s

// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 -fopenmp-simd -fopenmp-version=50 %{target_mac} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var -fopenmp-simd 
-fopenmp-version=60 %{target_mac} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host5,host-5-and-51,no-host5-and-51
 -fopenmp-simd -fopenmp-version=50 -fopenmp-is-target-device %{target_mac} 
%{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var -fopenmp-simd 
-fopenmp-version=60 -fopenmp-is-target-device %{target_mac} %{limit} -o - %s

// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp45,omp45-to-51,omp45-to-51-var,omp45-to-51-clause 
-fopenmp-version=45 -fopenmp-simd %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp51,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 -fopenmp %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp51,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 -fopenmp %{limit} -DTESTEND=1 -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp51,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 -fopenmp %{limit} -I%S/Inputs -DTESTENDINC=1 -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp51,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 -fopenmp-simd %{limit} -o - %s

// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var -fopenmp 
-fopenmp-version=52 -DVERBOSE_MODE=1 %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
-DVERBOSE_MODE=1 %{limit} -o - %s

// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp5,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 %{openmp50} %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp51,ompvar,omp45-to-51,omp5-and-51,omp5-or-later,omp5-or-later-var,omp45-to-51-var,omp45-to-51-clause,host-5-and-51,no-host5-and-51
 -fopenmp %{limit} -o - %s
// RUN: %clang_cc1 %{common_opts_mac} 
-verify=expected,omp52,ompvar,omp5-or-later,omp5-or-later-var %{openmp60} 
%{limit} -o - %s


// expected-error@+1 {{unexpected OpenMP directive '#pragma omp end declare 
target'}}
#pragma omp end declare target 

// ompvar-error@+1 {{variable captured in declare target region must appear in 
a to clause}}
int a, b, z;
// expected-note@+1 {{defined as threadprivate or threa

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits

Meinersbur wrote:

Yes, I think that would be helpful. Also, avoid duplicating lines with multiple 
`-verify=` prefixes.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> I don't think it is necessary to test each value of `-fopenmp-version=` 
> separately, but don't mind either as long it doesn't affect maintanability.
> 
> * Instead of repeating each clang diagnositic, consider passing multiple 
> values to `-verify`, e.g. `-verify=omp51,omp60`, 
> `-verify=omp51-exact,omp60-or-lafter`
> * Write expected diagnostics on separate lines using `@`-syntax

I think this mostly applies to `declare_target_messages.cpp` and 
`distribute_simd_misc_messages.c` right? Should I change all the lines to the 
form `@`-syntax?

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur commented:

I don't think it is necessary to test each value of `-fopenmp-version=` 
separately, but don't mind either as long it doesn't affect maintanability. 

 * Instead of repeating each clang diagnositic, consider passing multiple 
values to `-verify`, e.g. `-verify=omp51,omp60`, 
`-verify=omp51-exact,omp60-or-lafter`

 * Write expected diagnostics on separate lines using `@`-syntax

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits


@@ -2,9 +2,16 @@
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -fopenmp-version=51 -emit-pch -o 
%t %s
 // RUN: %clang_cc1 -fopenmp -std=c++11 -fopenmp-version=51 -include-pch %t 
-verify %s -ast-print | FileCheck %s
 

Meinersbur wrote:

[nit] Consistency: Either add newline to separate 5.1 and 6.0 tests, or not.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits

https://github.com/Meinersbur edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits


@@ -12,11 +18,16 @@
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s
 
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp52 
-fopenmp -fopenmp-version=52 -DVERBOSE_MODE=1 -fnoopenmp-use-tls -ferror-limit 
100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp52 
-fopenmp -fopenmp-version=60 -DVERBOSE_MODE=1 -fnoopenmp-use-tls -ferror-limit 
100 -o - %s
+
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5 
-fopenmp -fopenmp-version=50 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp51 
-fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp6 
-fopenmp -fopenmp-version=60 -fnoopenmp-use-tls -ferror-limit 100 -o - %s
+
+
 #pragma omp end declare target // expected-error {{unexpected OpenMP directive 
'#pragma omp end declare target'}}
 
-int a, b, z; // omp5-error {{variable captured in declare target region must 
appear in a to clause}} // omp51-error {{variable captured in declare target 
region must appear in a to clause}} omp52-error {{variable captured in declare 
target region must appear in a to clause}}
+int a, b, z; // omp5-error {{variable captured in declare target region must 
appear in a to clause}} // omp51-error {{variable captured in declare target 
region must appear in a to clause}} omp52-error {{variable captured in declare 
target region must appear in a to clause}} omp6-error {{variable captured in 
declare target region must appear in a to clause}}

Meinersbur wrote:

Can you do something like `-verify=expected,omp52` as in others tests to not 
copy each line?

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-21 Thread Michael Kruse via cfe-commits


@@ -68,15 +70,15 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
-#pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])// 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(aa) :vv)  // 
expected-error {{missing map type}}
+#pragma omp target map(mapper(aa) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}}

Meinersbur wrote:

Originates from #90499 which already added tests with `-fopenmp-version=60`.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> Thanks for revising the PR. I have added some comments.
> 
> To unblock #119891, wouldn't it be sufficient that `-fopenmp-version=60` 
> becomes a valid value? Do we need to modify all these tests to test only this 
> flag?

Yes it's sufficient and that's what's done in #119891.
The edit in the LIT tests now are only addition of `-fopen-version=60`.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> Please address @saiislam's questions. I also think that the title and 
> description of the PR should reflect that this PR not only introduces the 6.0 
> flag, but also moves several of the tests to test against 5.1 and 6.0.

I responded to the question.
The changes in the tests are against 6.0 only. I have only added run lines with 
`fopenmp=6.0`.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-20 Thread Michael Kruse via cfe-commits

Meinersbur wrote:

> In #119891 we are introducing the support for `#pragma omp stripe` which is 
> an OMP6.0 feature (see [#119891 
> (files)](https://github.com/llvm/llvm-project/pull/119891/files#r1896944800)).
>  This PR changes the default option to 6.0.

Summary (which usually is the basis for the commit message) needs an update.

Suggestion:
Add support for the `-fopenmp-version=60` command line argument. It is needed 
for #122108 (`#pragma omp stripe`) which will be the first OpenMP 6.0 directive 
implemented. Add regression tests for Clang in `-fopenmp-version=60` mode.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-18 Thread Michael Klemm via cfe-commits

https://github.com/mjklemm requested changes to this pull request.

Please address @saiislam's questions.  I also think that the title and 
description of the PR should reflect that this PR not only introduces the 6.0 
flag, but also moves several of the tests to test against 5.1 and 6.0. 

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-17 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> Please resolve open feedback items before the next round of reviews. Thanks.

Sorry I might have been ahead of myself!
I think this time I might have gotten it.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-16 Thread Zahira Ammarguellat via cfe-commits


@@ -19,6 +19,8 @@ typedef void *omp_depend_t;
 void foo() {}
 void tmainc(){
omp_depend_t obj;
+   int omp_all_memory;

zahiraam wrote:

Removed.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-15 Thread Michael Klemm via cfe-commits

mjklemm wrote:

Please resolve open feedback items before the next round of reviews. Thanks.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-15 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

@mjklemm, @saiislam can you please review this? Thanks.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Zahira Ammarguellat via cfe-commits


@@ -68,15 +70,15 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
-#pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])// 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}

zahiraam wrote:

Oops! I didn't see this comment. Disregard my previous one. I should be able to 
do that. 

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Zahira Ammarguellat via cfe-commits


@@ -68,15 +70,15 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
-#pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])// 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(aa) :vv)  // 
expected-error {{missing map type}}
+#pragma omp target map(mapper(aa) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}}

zahiraam wrote:

The reason I made this change is because I added `RUN` line 4 at the test. When 
`fopenmp-version=60` we are not expecting a `missing map type` error, see 
(https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseOpenMP.cpp#L4833).

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits

https://github.com/saiislam commented:

Thanks for the revising the PR. I have added some comments.

To unblock #119891, wouldn't it be sufficient that `-fopenmp-version=60` 
becomes a valid value? Do we need to modify all these tests to test only this 
flag?

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -63,22 +63,22 @@ class VV {
   // CHECK-NEXT: int add(int a, int b) __attribute__((cold)){
   // CHECK-NEXT: return a + b;
   // CHECK-NEXT: }
-  #pragma omp declare simd uniform(this, a) linear(val(b): a)
+  #pragma omp declare simd uniform(this, a) linear(b: a)

saiislam wrote:

Why do we need to remove val, ref, and uval clauses from these test cases? If 
they are not supported by 6.0 then please check them separately.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits

https://github.com/saiislam edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -25,16 +36,16 @@ __thread int t; // expected-note {{defined as threadprivate 
or thread local}}
 void f();
 #pragma omp end declare target shared(a) // expected-warning {{extra tokens at 
the end of '#pragma omp end declare target' are ignored}}
 
-#pragma omp declare target map(a) // omp45-error {{expected at least one 'to' 
or 'link' clause}} omp5-error {{expected at least one 'to' or 'link' clause}} 
omp51-error {{expected at least one 'to', 'link' or 'indirect' clause}} 
omp45-error {{unexpected 'map' clause, only 'to' or 'link' clauses expected}} 
omp5-error {{unexpected 'map' clause, only 'to', 'link' or 'device_type' 
clauses expected}} omp51-error {{unexpected 'map' clause, only 'to', 'link', 
'device_type' or 'indirect' clauses expected}} omp52-error {{unexpected 'map' 
clause, only 'enter', 'link', 'device_type' or 'indirect' clauses expected}} 
omp52-error {{expected at least one 'enter', 'link' or 'indirect' clause}}
+#pragma omp declare target map(a) // omp45-error {{expected at least one 'to' 
or 'link' clause}} omp5-error {{expected at least one 'to' or 'link' clause}} 
omp6-error {{unexpected 'map' clause, only 'enter', 'link', 'device_type' or 
'indirect' clauses expected}} omp6-error {{expected at least one 'enter', 
'link' or 'indirect' clause}} omp51-error {{expected at least one 'to', 'link' 
or 'indirect' clause}} omp45-error {{unexpected 'map' clause, only 'to' or 
'link' clauses expected}} omp5-error {{unexpected 'map' clause, only 'to', 
'link' or 'device_type' clauses expected}} omp51-error {{unexpected 'map' 
clause, only 'to', 'link', 'device_type' or 'indirect' clauses expected}} 
omp52-error {{unexpected 'map' clause, only 'enter', 'link', 'device_type' or 
'indirect' clauses expected}} omp52-error {{expected at least one 'enter', 
'link' or 'indirect' clause}}

saiislam wrote:

May be add the error for 60 in the end, after 45, 50, 51, and 52 errors.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -4,19 +4,19 @@
 // RUN: %clang_cc1 -verify -std=c++11 -fopenmp -ast-print %s 
-Wno-openmp-mapping -DOMP5 | FileCheck %s --check-prefix=CHECK 
--check-prefix=OMP50
 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s -DOMP5
 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -verify %s -ast-print 
-Wno-openmp-mapping -DOMP5 | FileCheck %s --check-prefix=CHECK 
--check-prefix=OMP50
-// RUN: %clang_cc1 -verify -std=c++11 -fopenmp -fopenmp-version=51 -ast-print 
%s -Wno-openmp-mapping -DOMP51 | FileCheck %s --check-prefix=CHECK 
--check-prefix=OMP51
-// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -x c++ -std=c++11 -emit-pch -o 
%t %s -DOMP51
-// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -std=c++11 -include-pch %t 
-verify %s -ast-print -Wno-openmp-mapping -DOMP51 | FileCheck %s 
--check-prefix=CHECK --check-prefix=OMP51
+// RUN: %clang_cc1 -verify -std=c++11 -fopenmp -fopenmp-version=60 -ast-print 
%s -Wno-openmp-mapping -DOMP51 | FileCheck %s --check-prefix=CHECK 
--check-prefix=OMP51

saiislam wrote:

Please don't reduce existing testing for 5.1, instead add new tests for 6.0

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -68,15 +70,15 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
-#pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])// 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}

saiislam wrote:

If the behavior is different only for 6.0 then may be put it in a separate 
block guarded by `#ifndef OMP60` and `-DOMP60`

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits

https://github.com/saiislam edited 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -69,11 +80,11 @@ void c();
 
 void func() {} // expected-note {{'func' defined here}}
 
-#pragma omp declare target link(func) allocate(a) // expected-error {{function 
name is not allowed in 'link' clause}} omp45-error {{unexpected 'allocate' 
clause, only 'to' or 'link' clauses expected}} omp5-error {{unexpected 
'allocate' clause, only 'to', 'link' or 'device_type' clauses expected}} 
omp51-error {{unexpected 'allocate' clause, only 'to', 'link', 'device_type' or 
'indirect' clauses expected}} omp52-error {{unexpected 'allocate' clause, only 
'enter', 'link', 'device_type' or 'indirect' clauses expected}}
+#pragma omp declare target link(func) allocate(a) // expected-error {{function 
name is not allowed in 'link' clause}} omp45-error {{unexpected 'allocate' 
clause, only 'to' or 'link' clauses expected}} omp5-error {{unexpected 
'allocate' clause, only 'to', 'link' or 'device_type' clauses expected}} 
omp6-error {{unexpected 'allocate' clause, only 'enter', 'link', 'device_type' 
or 'indirect' clauses expected}} omp51-error {{unexpected 'allocate' clause, 
only 'to', 'link', 'device_type' or 'indirect' clauses expected}} omp52-error 
{{unexpected 'allocate' clause, only 'enter', 'link', 'device_type' or 
'indirect' clauses expected}}
 
 void bar();
 void baz() {bar();}
-#pragma omp declare target(bar) // omp5-warning {{declaration marked as 
declare target after first use, it may lead to incorrect results}} // 
omp51-warning {{declaration marked as declare target after first use, it may 
lead to incorrect results}} omp52-warning {{declaration marked as declare 
target after first use, it may lead to incorrect results}}
+#pragma omp declare target(bar) // omp5-warning {{declaration marked as 
declare target after first use, it may lead to incorrect results}} omp6-warning 
{{declaration marked as declare target after first use, it may lead to 
incorrect results}} // omp51-warning {{declaration marked as declare target 
after first use, it may lead to incorrect results}} omp52-warning {{declaration 
marked as declare target after first use, it may lead to incorrect results}}

saiislam wrote:

Please follow previous order (5, 51, 52) of adding warnings.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -emit-llvm 
-o - %s | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -triple x86_64-apple-darwin10 -x c++ -std=c++11 
-emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -triple x86_64-apple-darwin10 -std=c++11 
-include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp 
-fopenmp-version=50 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -triple x86_64-apple-darwin10 
-x c++ -std=c++11 -emit-pch -o %t %s

saiislam wrote:

This is changing the test case from testing default (ver 5.1) to ver 5.0. If 
there is a divergence, please add a RUN and CHECK lines while guarding 
divergent lines.

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -19,6 +19,8 @@ typedef void *omp_depend_t;
 void foo() {}
 void tmainc(){
omp_depend_t obj;
+   int omp_all_memory;

saiislam wrote:

Do we need this new variable?

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-13 Thread Saiyedul Islam via cfe-commits


@@ -68,15 +70,15 @@ int fun(int arg) {
   {}
 #pragma omp target map(mapper(aa :vv)   // 
expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected 
')'}} expected-error {{call to undeclared function 'mapper'}} expected-note 
{{to match this '('}}
   {}
-#pragma omp target map(mapper(ab) :vv)  // 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(ab) :arr[0:2])// 
expected-error {{missing map type}} expected-error {{cannot find a valid 
user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])// 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}} expected-error 
{{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
   {}
-#pragma omp target map(mapper(aa) :vv)  // 
expected-error {{missing map type}}
+#pragma omp target map(mapper(aa) :vv)  // 
omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error 
{{missing map type}} omp51-simd-error {{missing map type}}

saiislam wrote:

Is there a need to split this message for all types when the message remains 
the same?

https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-10 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

@mjklemm and @saiislam would you mind taking a look at this please? Thanks.



https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-09 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam ready_for_review 
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits