[all-commits] [llvm/llvm-project] 6b0d26: [Flang] Adding first lowering for the allocation a...

Jean-Didier PAILLEUX via All-commits all-commits at lists.llvm.org
Fri Apr 17 01:17:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b0d268fe544b25fd1f82aad4e246f8a74e260ed
      https://github.com/llvm/llvm-project/commit/6b0d268fe544b25fd1f82aad4e246f8a74e260ed
  Author: Jean-Didier PAILLEUX <jean-didier.pailleux at sipearl.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M flang/include/flang/Lower/MultiImageFortran.h
    A flang/include/flang/Optimizer/Builder/MIFCommon.h
    M flang/include/flang/Optimizer/Dialect/MIF/MIFOps.td
    M flang/include/flang/Optimizer/Transforms/MIFOpConversion.h
    M flang/lib/Lower/Allocatable.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/ConvertVariable.cpp
    M flang/lib/Lower/MultiImageFortran.cpp
    M flang/lib/Optimizer/Builder/CMakeLists.txt
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    A flang/lib/Optimizer/Builder/MIFCommon.cpp
    M flang/lib/Optimizer/Dialect/MIF/CMakeLists.txt
    M flang/lib/Optimizer/Dialect/MIF/MIFOps.cpp
    M flang/lib/Optimizer/Transforms/MIFOpConversion.cpp
    M flang/test/Fir/MIF/change_team.mlir
    M flang/test/Fir/MIF/change_team2.mlir
    A flang/test/Fir/MIF/coarray-alloc.mlir
    M flang/test/Fir/MIF/form_team.mlir
    M flang/test/Fir/MIF/get_team.mlir
    M flang/test/Fir/MIF/sync_team.mlir
    M flang/test/Fir/MIF/team_number.mlir
    A flang/test/Lower/MIF/coarray_allocation.f90
    A flang/test/Lower/MIF/coarray_allocation2.f90
    A flang/test/Lower/MIF/coarray_allocation3.f90
    A flang/test/Lower/MIF/coarray_allocation4.f90
    A flang/test/Lower/MIF/coarray_allocation5.f90

  Log Message:
  -----------
  [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 at lbl.gov>



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