[flang-commits] [flang] [mlir] [WIP] Delayed privatization. (PR #79862)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Jan 30 15:15:14 PST 2024


================
@@ -0,0 +1,38 @@
+// RUN: fir-opt -verify-diagnostics %s | fir-opt | FileCheck %s
+
+// CHECK-LABEL: _QPprivate_clause
+func.func @_QPprivate_clause() {
+  %0 = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFprivate_clause_allocatableEx"}
+  %1 = fir.alloca i32 {bindc_name = "y", uniq_name = "_QFprivate_clause_allocatableEy"}
+
+  // CHECK: omp.parallel private(@x.privatizer %0 -> %arg0, @y.privatizer %1 -> %arg1 : !fir.ref<i32>, !fir.ref<i32>)
+  omp.parallel private(@x.privatizer %0 -> %arg0, @y.privatizer %1 -> %arg1 : !fir.ref<i32>, !fir.ref<i32>) {
----------------
clementval wrote:

Do you really need to add a block argument? The operands in  `private_vars` should already be block argument AFAICT. 

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


More information about the flang-commits mailing list