[all-commits] [llvm/llvm-project] 021f7f: [OpenMP] Propagate ALWAYS/DELETE/CLOSE map-type mo...
Abhinav Gaba via All-commits
all-commits at lists.llvm.org
Mon Jul 27 17:47:50 PDT 2026
Branch: refs/heads/users/abhinavgaba/attach-maps-in-mappers-2
Home: https://github.com/llvm/llvm-project
Commit: 021f7f4457a031b29030a55844bb530b77239c0a
https://github.com/llvm/llvm-project/commit/021f7f4457a031b29030a55844bb530b77239c0a
Author: Abhinav Gaba <abhinav.gaba at intel.com>
Date: 2026-07-27 (Mon, 27 Jul 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/test/OpenMP/declare_mapper_codegen.cpp
M clang/test/OpenMP/target_map_array_of_structs_with_nested_mapper_codegen.cpp
M clang/test/OpenMP/target_map_array_section_of_structs_with_nested_mapper_codegen.cpp
M clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/test/Target/LLVMIR/omptarget-llvm.mlir
M offload/test/mapping/mapper_map_always_from.c
M offload/test/mapping/mapper_map_always_to_enter_data.c
M offload/test/mapping/mapper_map_ptee_only_2_ptr_indirections.c
M offload/test/mapping/mapper_map_ptee_only_always_array.c
M offload/test/offloading/fortran/mapper-map-always-to-enter-data.f90
Log Message:
-----------
[OpenMP] Propagate ALWAYS/DELETE/CLOSE map-type modifiers to mapper entries
When a map clause uses a user-defined mapper, the map-type-modifying bits
(ALWAYS, DELETE, CLOSE) on the outer clause must apply to each map the mapper
inserts (OpenMP 6.0:281:34). Propagate them in emitUserDefinedMapper by OR-ing
the imported modifier bits into each pushed component, except ATTACH entries
(ATTACH|ALWAYS is reserved for attach(always) and the other bits are
meaningless for ATTACH).
PRESENT is intentionally not propagated here yet (a TODO notes it is handled in
a follow-on, since it requires distinguishing pointee entries from the struct's
own storage).
Update the offload always-propagation tests to their now-correct behavior:
ALWAYS forces a member transfer that the ref count would otherwise suppress, so
mapper_map_always_from.c reads s.y back as 111, and the enter-data variants
(C and Fortran) see 111 in the device copy (all were 0 before this change).
Since emitUserDefinedMapper is shared between clang and flang, the Fortran test
covers the flang path as well.
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list