[flang-commits] [flang] [Flang][OpenMP] Update declare mapper lookup via use-module (PR #163860)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Wed Oct 22 06:02:23 PDT 2025
kiranchandramohan wrote:
> > I don't see changes to add support (in lib/Semantics/mod-file.cpp) for emitting the `declare mapper` directive in the module file (*.mod). How did you manage to get this to work without it?
>
> I think it gets added here -
>
> https://github.com/llvm/llvm-project/blob/48a99ad1fa8b3fe7c0f23f02e95e6c23e145429d/flang/lib/Lower/OpenMP/OpenMP.cpp#L3583
I meant the module file (m_mod.mod) should have an entry for the declare mapper. Without this how will the mapper in `!$omp target map(mapper(mymap) : a)` know about `mymap`?
```
!mod$ v1 sum:bf468214a8672562
module m_mod
type::mty
integer(4)::x
end type
!$omp declare mapper(mymap : mty :: v) map(tofrom: v%x)
end
```
Does the FIR/OMP code generation generate a dummy declare mapper if none is found? If so that is not complete.
https://github.com/llvm/llvm-project/pull/163860
More information about the flang-commits
mailing list