[PATCH] D89395: [Flang][OpenMP 4.5] Add semantic check for OpenMP shared and private clause

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 14:54:57 PDT 2020


kiranchandramohan added a comment.

Thanks for this patch. Did you miss the array element check?



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:413
+
+  // OpenMP 4.5 : 2.15.3.3
+  CheckObjectListStructure(x.v);
----------------
Nit: you can skip the standard section number here.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:423
+
+  // OpenMP 4.5 : 2.15.3.2
+  CheckObjectListStructure(x.v);
----------------
Nit: you can skip the standard section number here.


================
Comment at: flang/lib/Semantics/check-omp-structure.h:165
 
-private:
+  // OpenMP 4.5 : 2.15.3.2 and 2.15.3.3
+  void CheckObjectListStructure(const parser::OmpObjectList &objList);
----------------
Nit: You can skip the section number here.


================
Comment at: flang/test/Semantics/omp-parallel-private.f90:8
+      type my_type
+              integer :: array(10)
+      end type my_type
----------------
Nit: alignment


================
Comment at: flang/test/Semantics/omp-parallel-private.f90:14-17
+      do i = 1, 10
+      a(i) = i
+      b(i) = i * i
+      end do
----------------
Is this loop required for this test?


================
Comment at: flang/test/Semantics/omp-parallel-private.f90:21-24
+      do i = 1, 10
+      c(i) = a(i) + b(i) + k
+      my_var%array(i) = k
+      end do
----------------
Nit: Alignment.


================
Comment at: flang/test/Semantics/omp-parallel-shared.f90:8
+  type my_type
+  integer :: array(10)
+  end type my_type
----------------
Nit: alignment


================
Comment at: flang/test/Semantics/omp-parallel-shared.f90:11-15
+ type(my_type) :: my_var
+  do i = 1, 10
+     a(i) = i
+     b(i) = i * i
+  end do
----------------
Is this loop required for this test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89395



More information about the llvm-commits mailing list