Implements the allocation and deallocation semantics for allocatables and pointers in declare directives (OpenACC 3.4, Section 2.13.2). For a non-shared memory device, allocate/deallocate must keep local and device memory in sync. Lowering generates recipe functions (with acc dialect ops to create the device copy) and attaches an attribute to the operations that allocate or deallocate the object. This pass finds those operations and inserts calls to the corresponding recipe. Example: for "!$acc declare create(arr)" and "allocate(arr(100))" in a subroutine, the pass inserts a call to the post-alloc recipe after the store so the device copy is created. --------- Co-authored-by: Susan Tan <zujunt@nvidia.com>
21 KiB
21 KiB