[flang-commits] [flang] [mlir] [Flang][OpenMP] Privatize descriptors for assumed shape array maps for performance increase (PR #212336)

Pranav Bhandarkar via flang-commits flang-commits at lists.llvm.org
Tue Aug 11 21:49:32 PDT 2026


================
@@ -752,10 +758,20 @@ class MapInfoFinalizationPass
   /// issues.
   mlir::omp::ClauseMapFlags
   getDescriptorMapType(mlir::omp::ClauseMapFlags mapTypeFlag,
-                       mlir::Operation *target) {
+                       mlir::Operation *target, bool privatizeDescriptor) {
     using MapFlags = mlir::omp::ClauseMapFlags;
     MapFlags flags = MapFlags::none;
 
+    // Special runtime case for descriptor privatization requires the
+    // following map types in synergy:
+    //
+    //  PRIVATE | ATTACH | TARGET_PARAM
+    //
+    if (privatizeDescriptor) {
----------------
bhandarkar-pranav wrote:

Ok, ignore the previous comment because on scrolling down I see that `privatizeDescriptor` is true only if the operation is `omp.target`.

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


More information about the flang-commits mailing list