[all-commits] [llvm/llvm-project] 0229ac: [OpenMP] Propagate PRESENT to pointee entries in m...
Abhinav Gaba via All-commits
all-commits at lists.llvm.org
Thu Jul 16 17:03:52 PDT 2026
Branch: refs/heads/users/abhinavgaba/attach-maps-in-mappers-4
Home: https://github.com/llvm/llvm-project
Commit: 0229ace8ee05917efd8c60ffe26cd1819965ca11
https://github.com/llvm/llvm-project/commit/0229ace8ee05917efd8c60ffe26cd1819965ca11
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/lib/Frontend/OpenMP/OMPIRBuilder.cpp
A offload/test/mapping/mapper_map_mbr_ptee_then_present_mbr_ptee.c
A offload/test/mapping/mapper_map_mbr_then_present_mbr_ptee.c
A offload/test/mapping/mapper_map_present_ptee.c
M offload/test/mapping/mapper_target_update_present_ptee.c
Log Message:
-----------
[OpenMP] Propagate PRESENT to pointee entries in mapper codegen
Extend mapper map-type-modifier propagation to include PRESENT, gated to
entries that have an attach pointer (HasAttachPtr): the pointee data, whose
storage differs from the struct being mapped. A present modifier on the outer
map/motion clause must require that pointee to be present on the device; the
present-check on the struct's own storage does not cover it.
Regular struct members still receive only ALWAYS/DELETE/CLOSE (mask 1036);
attach-ptr/pointee entries receive ALWAYS/DELETE/CLOSE/PRESENT (mask 5132).
ATTACH entries receive no modifier bits.
TODO: PRESENT should also propagate to the struct's own members (e.g. s.x, s.y
of map(present, mapper(id): s)) so an absent member triggers the present-check.
That is blocked while pointer members use PTR_AND_OBJ (a single combined entry
allocates the whole struct including the pointer's storage, so propagating
PRESENT there would wrongly require the pointer's pointee to be present).
Enable it once Clang emits attach-style maps throughout instead of PTR_AND_OBJ.
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