[flang-commits] [flang] [mlir] [mlir][OpenMP] - MLIR to LLVMIR translation support for delayed privatization of allocatables in `omp.target` ops (PR #116576)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Nov 18 03:44:13 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();
+// }
----------------
tblah wrote:
```suggestion
```
nit
https://github.com/llvm/llvm-project/pull/116576
More information about the flang-commits
mailing list