[llvm-branch-commits] [flang] [Flang][OpenMP][Offload] Modify MapInfoFinalization to handle attach mapping and 6.1's ref_* and attach map keywords (PR #177715)
Pranav Bhandarkar via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon May 4 21:54:03 PDT 2026
================
@@ -455,6 +455,12 @@ mlir::Value createParentSymAndGenIntermediateMaps(
interimMapType &= ~mlir::omp::ClauseMapFlags::to;
interimMapType &= ~mlir::omp::ClauseMapFlags::from;
interimMapType &= ~mlir::omp::ClauseMapFlags::return_param;
+ // We do not want to carry over the separation of descriptor and pointer
+ // mapping of any intermediate components we emit maps for as this can
+ // result in very odd differing behaviour when either ref_ptr/ptee is
+ // specified.
+ interimMapType &= ~mlir::omp::ClauseMapFlags::ref_ptr;
----------------
bhandarkar-pranav wrote:
Is the following possible because here `ref_ptr_ptee` is not stripped. If a user specifies `map(ref_ptr_ptee, tofrom: x%y)` where `x` is a derived type, the intermediate map for `x` will retain the `ref_ptr_ptee` flag. When `MapInfoFinalization` later processes `x`, it may attempt to generate a
base-addr and attach map for the intermediate structural map of `x`, which is incorrect.
https://github.com/llvm/llvm-project/pull/177715
More information about the llvm-branch-commits
mailing list