[all-commits] [llvm/llvm-project] 5ee248: [flang] Remove legacy stack-arrays and memory-allo...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Jul 29 04:31:30 PDT 2026


  Branch: refs/heads/users/jeanPerier/merge_memory_passes_5
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ee248e30ecc9452f03908af00d58e8b1e74202e
      https://github.com/llvm/llvm-project/commit/5ee248e30ecc9452f03908af00d58e8b1e74202e
  Author: root <jperier at nvidia.com>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M flang/docs/fstack-arrays.md
    M flang/include/flang/Optimizer/Passes/CommandLineOpts.h
    M flang/include/flang/Optimizer/Passes/Pipelines.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Optimizer/Passes/CommandLineOpts.cpp
    M flang/lib/Optimizer/Passes/Pipelines.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    R flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
    M flang/lib/Optimizer/Transforms/StackArrays.cpp
    M flang/test/Fir/allocation-placement-pipeline.fir
    M flang/test/Fir/memory-allocation-opt-2.fir
    M flang/test/Fir/memory-allocation-opt-do-concurrent.fir
    M flang/test/Fir/memory-allocation-opt.fir
    M flang/test/Transforms/stack-arrays-block-cfg-scope.fir
    M flang/test/Transforms/stack-arrays-hlfir.f90
    M flang/test/Transforms/stack-arrays-lifetime.fir
    M flang/test/Transforms/stack-arrays-nested-scope.fir
    M flang/test/Transforms/stack-arrays-scope.f90
    M flang/test/Transforms/stack-arrays.fir

  Log Message:
  -----------
  [flang] Remove legacy stack-arrays and memory-allocation-opt passes

The unified allocation-placement pass now supersedes both the heap-to-stack
stack-arrays pass and the stack-to-heap memory-allocation-opt pass, and is the
default in the FIR optimizer pipeline. Remove the two legacy passes: their
TableGen definitions, the MemoryAllocation.cpp source, the memory-allocation-opt
command-line options, the enable-allocation-placement fallback switch, and the
addMemoryAllocationOpt pipeline helper. The pass-only portions of
StackArrays.cpp are dropped while its analysis and rewrite pattern, now shared
with allocation-placement, are kept.

The legacy tests are retargeted onto allocation-placement to show it reproduces
both prior behaviors: the stack-arrays tests use "stack-arrays=true", and the
memory-allocation-opt tests use the default policy (runtime-sized and big
constant-size temporaries go on the heap).



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