Files
llvm-project/flang/lib/Optimizer/Transforms/MIFOpConversion.cpp
Jean-Didier PAILLEUX 6b0d268fe5 [Flang] Adding first lowering for the allocation and deallocation of coarrays (#182110)
This PR add support of coarray allocation and deallocation in Flang and
adds two new operations to MIF:
- `mif::AllocaCoarrayOp` : Allocates a coarray
using `prif_allocate_coarray` PRIF procedure.
- `mif::DeallocaCoarrayOp` : Deallocates a coarray
using `prif_deallocate_coarray` PRIF procedure

This PR does not yet handle allocation for the following cases (which
will be added in future PRs):
- Coarrays with ALLOCATABLE and/or POINTER components (PRIF has
procedures (`prif_(de)allocate`) for this).
- Coarray dummy arguments (PRIF has also procedures for this)
- Finalization of coarrays
- non-ALLOCATABLE SAVE coarrays outside the scoping unit of the main
program (e.g. non-ALLOCATABLE coarrays declared in a module or a
procedure)

Another PR which add support of some basic intrinsics with a coarray as
an argument will follow after this one.

---------

Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
2026-04-17 10:16:56 +02:00

49 KiB