[all-commits] [llvm/llvm-project] cc14bf: [flang] add a pass to move array temporaries to th...

Tom Eccles via All-commits all-commits at lists.llvm.org
Tue Feb 7 02:28:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc14bf22bddf7abb1f13099c2d6ace5cdb8b7a5f
      https://github.com/llvm/llvm-project/commit/cc14bf22bddf7abb1f13099c2d6ace5cdb8b7a5f
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-02-07 (Tue, 07 Feb 2023)

  Changed paths:
    M clang/docs/tools/clang-formatted-files.txt
    M flang/include/flang/Optimizer/Builder/MutableBox.h
    M flang/include/flang/Optimizer/Dialect/FIRAttr.h
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Lower/Allocatable.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    A flang/lib/Optimizer/Transforms/StackArrays.cpp
    M flang/test/Lower/HLFIR/allocatable-and-pointer-status-change.f90
    M flang/test/Lower/Intrinsics/c_loc.f90
    M flang/test/Lower/Intrinsics/system_clock.f90
    A flang/test/Transforms/stack-arrays.f90
    A flang/test/Transforms/stack-arrays.fir

  Log Message:
  -----------
  [flang] add a pass to move array temporaries to the stack

This pass implements the `-fstack-arrays` flag. See the RFC in
`flang/docs/fstack-arrays.md` for more information.

Differential revision: https://reviews.llvm.org/D140415


  Commit: bf81ba37262880a8391f63c1747d61e4851344c4
      https://github.com/llvm/llvm-project/commit/bf81ba37262880a8391f63c1747d61e4851344c4
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-02-07 (Tue, 07 Feb 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/docs/FlangDriver.md
    M flang/include/flang/Frontend/CodeGenOptions.def
    M flang/include/flang/Tools/CLOptions.inc
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/test/Driver/driver-help-hidden.f90
    M flang/test/Driver/driver-help.f90
    M flang/test/Driver/fast_math.f90
    M flang/test/Transforms/stack-arrays.f90

  Log Message:
  -----------
  [flang] add -fstack-arrays flag

The implementation of -fstack-arrays was added in
https://reviews.llvm.org/D140415

The new macro BoolOptionWithoutMarshalling in Options.td avoids
generating code to store the flags in clang data structures. For
example, writing something like

  defm stack_arrays : BoolOption<"f", "stack-arrays",
                                 CodeGenOpts<"StackArrays">, [...]

Would generate code referring to `clang::CodeGenOpts::StackArrays`, which
does not exist.

Differential Revision: https://reviews.llvm.org/D140972


Compare: https://github.com/llvm/llvm-project/compare/1637351fd125...bf81ba372628


More information about the All-commits mailing list