[all-commits] [llvm/llvm-project] 559571: [Flang][MIF] Allocation of NON-ALLOCATABLE SAVE co...

Jean-Didier PAILLEUX via All-commits all-commits at lists.llvm.org
Mon Jul 13 05:39:28 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5595710093f7f8b9cdb0ff4f8d7400e58bde09b2
      https://github.com/llvm/llvm-project/commit/5595710093f7f8b9cdb0ff4f8d7400e58bde09b2
  Author: Jean-Didier PAILLEUX <jean-didier.pailleux at sipearl.com>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M flang/include/flang/Lower/MultiImageFortran.h
    M flang/include/flang/Optimizer/Builder/MIFCommon.h
    M flang/include/flang/Optimizer/Dialect/MIF/MIFOps.td
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/ConvertVariable.cpp
    M flang/lib/Lower/MultiImageFortran.cpp
    M flang/lib/Optimizer/Builder/MIFCommon.cpp
    M flang/lib/Optimizer/Passes/Pipelines.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    A flang/lib/Optimizer/Transforms/EmitMIFGlobalCtors.cpp
    M flang/test/Fir/basic-program.fir
    M flang/test/Lower/MIF/coarray_allocation4.f90
    M flang/test/Lower/MIF/coarray_allocation5.f90

  Log Message:
  -----------
  [Flang][MIF] Allocation of NON-ALLOCATABLE SAVE coarray (#205847)

The goal of this PR is to add support for allocating NON-allocatable
coarrays that are not in the `Main` program.
All allocations will be performed in a function called
`__mif_save_coarrays_allocate`. If this function exists, then
LLVM::GlobalCtors is created (or modified).
The initialization of the MIF with `mif.init` is moved too in a
GlobalCtors with a priority of 0 to ensure that the initialization takes
place before any MIF allocations.

---------

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