[flang-commits] [flang] [mlir] [flang][OpenMP] - Add `MapInfoOp` instances for target private variables when needed (PR #109862)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Fri Oct 4 01:48:17 PDT 2024
================
@@ -0,0 +1,83 @@
+// RUN: fir-opt --split-input-file --omp-maps-for-privatized-symbols %s | FileCheck %s
+module attributes {omp.is_target_device = false} {
+ omp.private {type = private} @_QFtarget_simpleEsimple_var_private_ref_box_heap_i32 : !fir.ref<!fir.box<!fir.heap<i32>>> alloc {
+ ^bb0(%arg0: !fir.ref<!fir.box<!fir.heap<i32>>>):
+ %0 = fir.alloca !fir.box<!fir.heap<i32>> {bindc_name = "simple_var", pinned, uniq_name = "_QFtarget_simpleEsimple_var"}
+ %1 = fir.load %arg0 : !fir.ref<!fir.box<!fir.heap<i32>>>
+ %2 = fir.box_addr %1 : (!fir.box<!fir.heap<i32>>) -> !fir.heap<i32>
----------------
ergawy wrote:
nit: From this op till the end of the `alloc` region, I think we can just remove everything to simplify the test.
https://github.com/llvm/llvm-project/pull/109862
More information about the flang-commits
mailing list