llvm-project
b0b1ab8a - [flang][openacc] support array section privatization in lowering (#175184)

Commit
107 days ago
[flang][openacc] support array section privatization in lowering (#175184) Add support array section in private, firstprivate, and reduction. Key changes: - Change the related data operation result type to return the same type as the array base (same type as the acc variable input in the operation), while it was the type of the section before. This allows remapping the base the to result value (to use the data operation result as the base when generating addressing inside the compute region). - The generatePrivateInit implementation of FIROpenACCTypeInterfaces is modified to allocate storage only for the section, and to return the mock base address (that is the address of the allocation minus the offset/lower bound of the privatized section). - The code generating the copy and combiner region is moved from OpenACC.cpp to FIROpenACCTypeInterfaces.cpp via the addition of new generateCopy and generateCombiner interface in the MappableTypeInterface. This allows sharing all the addressing helper with generatePrivateInit, and will allow late generation of all recipes with Fortran. - Update generatePrivateDestroy to deallocate the beginning of the section if any. In the process, the generatePrivateInit implementation is modified so that it is more uniform to make it easier to deal with the section. This also allowed removing runtime calls when initializing the private for array reduction.
Author
Parents
Loading