[llvm-branch-commits] [flang] [Flang][OpenMP][Offload] Modify MapInfoFinalization to handle attach mapping and 6.1's ref_* and attach map keywords (PR #177715)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 28 05:33:12 PDT 2026
================
@@ -496,6 +733,57 @@ class MapInfoFinalizationPass
return false;
}
+ // This function generates an attach map, which is an type of OpenMP map that
+ // binds a pointer to its data, in the case of Fortran, this binding is
+ // primarily for binding the pointer inside of descriptors to the underlying
+ // data pointed to by the descriptor. This is simply an extra map that we must
+ // emit when generating any map of a descriptor type be it ref_ptr, ref_ptee
+ // or ref_ptr + ref_ptee (ref_ptr_ptee in OpenMP parlance), to bind the
+ // pointer inside of the descriptor to its respective data. The only case this
+ // can be omitted is when a user has explicitly asked for different attach
+ // semantics e.g. specifying attach(none) as a map modifier, this is the case
+ // where the [[maybe_unused]] attribute is relevant.
----------------
skatrak wrote:
```suggestion
/// This function generates an attach map, which is an type of OpenMP map that
/// binds a pointer to its data. In the case of Fortran, this binding is
/// primarily for binding the pointer inside of descriptors to the underlying
/// data pointed to by the descriptor. This is simply an extra map that we must
/// emit when generating any map of a descriptor type be it ref_ptr, ref_ptee
/// or ref_ptr + ref_ptee (ref_ptr_ptee in OpenMP parlance), to bind the
/// pointer inside of the descriptor to its respective data. The only case this
/// can be omitted is when a user has explicitly asked for different attach
/// semantics e.g. specifying attach(none) as a map modifier. This is the case
/// where the [[maybe_unused]] attribute is relevant.
```
https://github.com/llvm/llvm-project/pull/177715
More information about the llvm-branch-commits
mailing list