llvm-c166/offload/test
Akash Banerjee 2a1200e08c
[Flang][OpenMP] Fix Fortran automap handling (#162501)
This fixes Fortran `declare target enter(automap:...)` handling for
allocatable
descriptors.

- Replace the previous `has_device_addr` target-region rewrite with
explicit
  target data operations around allocation/deallocation.
- On allocation, emit:
  - descriptor `map(always,to)` to keep the Fortran descriptor present
  - storage `map(storage)` for the allocated array data
- `map(attach)` to update the device descriptor base address to the
device data
- On deallocation, delete both the mapped storage and descriptor.
- Add a weak visible offload-entry alias for local/hidden `declare
target to/enter`
globals so libomptarget can associate the host descriptor with the real
device
  global without changing the original symbol linkage.

This fixes `offload/test/offloading/fortran/declare-target-automap.f90`
reported broken in #161265.

Co-authored-by: Codex <codex@openai.com>
2026-07-14 16:03:05 +01:00
..
api
env
Inputs
jit
libc
mapping
offloading [Flang][OpenMP] Fix Fortran automap handling (#162501) 2026-07-14 16:03:05 +01:00
ompt
sanitizer
tools [offload] Add the ability to record and replay IR bitcode modules (#207278) 2026-07-08 09:53:13 -07:00
unified_shared_memory
unit
CMakeLists.txt
lit.cfg [offload][test] Add fallback to legacy AMDGPU triple library dir (#209131) 2026-07-13 19:16:21 +02:00
lit.site.cfg.in