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

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 4 09:53:09 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() : () -> ()
----------------
tblah wrote:

Please could you update the test to use the block arguments so we can see they are mapped correctly

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


More information about the llvm-branch-commits mailing list