[PATCH] D99757: [flang][OpenMP] Add semantic check for occurrence of constructs nested inside a SIMD region

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 5 07:35:49 PDT 2021


kiranchandramohan added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:267
+  // TODO: Check for declare simd regions.
+  bool eligibleSIMD = false;
+  if (llvm::omp::simdSet.test(GetContext().directive)) {
----------------
Nit: use braced initializers.


================
Comment at: flang/test/Semantics/omp-nested-simd.f90:75
+    IF (I <= 10) THEN
+      !ERROR: OpenMP constructs other than `!$OMP ORDERED SIMD` or '!$OMP ATOMIC' may not be nested inside 'SIMD' region.
+      !$OMP SIMD
----------------
Which revision of the standard are you following here?

4.5: 
An ordered construct with the simd clause is the only OpenMP construct that can be encountered during execution of a simd region.

5.0, 5.1:
The only OpenMP constructs that can be encountered during execution of a simd region are the atomic construct, the loop construct, the simd construct and the ordered construct with the simd clause.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99757/new/

https://reviews.llvm.org/D99757



More information about the llvm-commits mailing list