[Mlir-commits] [mlir] [mlir][OpenMP] add attribute for privatization barrier (PR #140089)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri May 16 08:51:42 PDT 2025
================
@@ -2872,6 +2872,23 @@ func.func @parallel_op_privatizers(%arg0: !llvm.ptr, %arg1: !llvm.ptr) {
return
}
+// CHECK-LABEL: parallel_op_privatizers_barrier
+// CHECK-SAME: (%[[ARG0:[^[:space:]]+]]: !llvm.ptr, %[[ARG1:[^[:space:]]+]]: !llvm.ptr)
+func.func @parallel_op_privatizers_barrier(%arg0: !llvm.ptr, %arg1: !llvm.ptr) {
+ // CHECK: omp.parallel private(
+ // CHECK-SAME: @x.privatizer %[[ARG0]] -> %[[ARG0_PRIV:[^[:space:]]+]],
+ // CHECK-SAME: @y.privatizer %[[ARG1]] -> %[[ARG1_PRIV:[^[:space:]]+]] : !llvm.ptr, !llvm.ptr)
+ // CHECK-SAME: private_barrier
----------------
NimishMishra wrote:
> There is nowhere in MLIR to print the omp.barrier that accurately describes its location in generated code, otherwise I could have moved the `omp.barrier` operation instead of adding this new attribute.
Okay understood. Thanks
https://github.com/llvm/llvm-project/pull/140089
More information about the Mlir-commits
mailing list