[flang-commits] [flang] [mlir] [mlir][OpenMP] - MLIR to LLVMIR translation support for delayed privatization of allocatables in `omp.target` ops (PR #116576)
Christian Ulmann via flang-commits
flang-commits at lists.llvm.org
Mon Nov 18 08:42:10 PST 2024
================
@@ -3819,7 +3815,57 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg,
return builder.saveIP();
}
+/// privatizer is a PrivateClauseOp that privatizes an MLIR value.
+/// privatizerNeedsMap returns true if the value being privatized in an
+/// omp.target p should additionally be mapped to the target region
+/// using a MapInfoOp. This is most common when an allocatable is privatized.
+/// In such cases, the descriptor is use in privatization and needs to be
+/// mapped on to the device.
+// static bool privatizerNeedsMap(omp::PrivateClauseOp &privatizer) {
+// Region &allocRegion = privatizer.getAllocRegion();
+// Value blockArg0 = allocRegion.getArgument(0);
+// return !blockArg0.use_empty();
+// }
+
+/// Return the llvm::Value * corresponding to the privateVar that
----------------
Dinistro wrote:
```suggestion
/// Return the llvm::Value * corresponding to the `privateVar` that
```
Nit: We usually refer to parameter names like this.
https://github.com/llvm/llvm-project/pull/116576
More information about the flang-commits
mailing list