[flang-commits] [flang] [flang][OpenMP] Extend locality spec to OMP claues (`init` and `dealloc` regions) (PR #142795)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Wed Jun 11 02:17:36 PDT 2025


================
@@ -0,0 +1,51 @@
+// Tests mapping `local` locality specifier to `private` clauses for non-empty
+// `init` and `dealloc` regions.
+
+// RUN: fir-opt --omp-do-concurrent-conversion="map-to=host" %s | FileCheck %s
+
+func.func @my_allocator() {
+  return
+}
+
+func.func @my_deallocator() {
+  return
+}
+
+fir.local {type = local} @_QFlocal_assocEaa_private_box_10xf32 : !fir.box<!fir.array<10xf32>> init {
+^bb0(%arg0: !fir.ref<!fir.box<!fir.array<10xf32>>>, %arg1: !fir.ref<!fir.box<!fir.array<10xf32>>>):
+  fir.call @my_allocator() : () -> ()
----------------
ergawy wrote:

Sorry for the delay. Done.


https://github.com/llvm/llvm-project/pull/142795


More information about the flang-commits mailing list