================
@@ -383,9 +383,21 @@ class MapInfoFinalizationPass
return mapTypeFlag;
mapFlags flags = mapFlags::OMP_MAP_TO |
- (mapFlags(mapTypeFlag) &
- (mapFlags::OMP_MAP_IMPLICIT | mapFlags::OMP_MAP_CLOSE |
- mapFlags::OMP_MAP_ALWAYS));
+ (mapFlags(mapTypeFlag) & mapFlags::OMP_MAP_IMPLICIT);
+
+ // Descriptors for objects will always be copied. This is because the
+ // descriptor can be rematerialized by the compiler, and so the address
+ // of the descriptor for a given object at one place in the code may
+ // differ from that address in another place. The contents of the
+ // descriptor (the base address in particular) will remain unchanged
+ // though.
+ // TODO/FIXME: We currently cannot have MAP_CLOSE and MAP_ALWAYS on
+ // the descriptor at once, these are mutually exclusive and when
+ // both are applied the runtime will fail to map.
----------------
agozillon wrote:
I'd rather we didn't at least at the moment, as I don't think there's anything
in the specification that prohibits it, it's likely just a runtime issue or a
mapping oddity that'll need addressed in the near future. Think I answered this
in a previous comment a bit more :-)
P.S. Thank you for the review and approval!
https://github.com/llvm/llvm-project/pull/119589
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits