[all-commits] [llvm/llvm-project] b4111b: [OpenMP] Track attach-ptr entries in mapper codege...
Abhinav Gaba via All-commits
all-commits at lists.llvm.org
Thu Jul 16 16:39:39 PDT 2026
Branch: refs/heads/users/abhinavgaba/attach-maps-in-mappers-3
Home: https://github.com/llvm/llvm-project
Commit: b4111b96ef23ebe415187a28957617c7100f44a4
https://github.com/llvm/llvm-project/commit/b4111b96ef23ebe415187a28957617c7100f44a4
Author: Abhinav Gaba <abhinav.gaba at intel.com>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M clang/lib/CodeGen/CGOpenMPRuntime.cpp
M clang/test/OpenMP/declare_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 llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M offload/test/mapping/mapper_map_ptee_only.c
M offload/test/mapping/mapper_map_ptee_only_2_ptr_indirections.c
M offload/test/mapping/mapper_map_ptee_only_2_ptr_indirections_array.c
M offload/test/mapping/mapper_map_ptee_only_2ndlevel.c
Log Message:
-----------
[OpenMP] Track attach-ptr entries in mapper codegen (HasAttachPtr)
Add a per-entry HasAttachPtr flag to MapInfosTy. It is set for entries that
have an attach pointer (and thus an accompanying ATTACH entry linking that ptr
to its pointee): pointee/combined entries whose storage differs from the struct
being mapped. It is NOT set for the ATTACH entries themselves.
In emitUserDefinedMapper, entries with HasAttachPtr (or the ATTACH bit, or the
Flang/MLIR PreserveMemberOfFlags) do not receive a new outer MEMBER_OF: pointee
data occupies a different storage block than the struct, and ATTACH entries
just link a ptr to its ptee. Existing inner MEMBER_OF bits are still shifted.
Clang (CGOpenMPRuntime) and the MLIR translator populate HasAttachPtr in
parallel with the other per-entry arrays; the MLIR/Flang side currently pushes
false with a TODO to set it for pointee-storage entries (e.g. s%p(0:10)) and
eventually drop PreserveMemberOfFlags in favor of it.
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