[all-commits] [llvm/llvm-project] 93fea7: [flang][hlfir] Support mold operand for hlfir.elem...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Aug 8 09:59:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 93fea7dd11477983a6903187fa6fec65be1ffe1b
      https://github.com/llvm/llvm-project/commit/93fea7dd11477983a6903187fa6fec65be1ffe1b
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/HLFIRTools.h
    M flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h
    M flang/include/flang/Optimizer/HLFIR/HLFIROpBase.td
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Lower/ConvertArrayConstructor.cpp
    M flang/lib/Optimizer/Builder/HLFIRTools.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIRDialect.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
    M flang/test/HLFIR/elemental.fir
    M flang/test/HLFIR/invalid.fir

  Log Message:
  -----------
  [flang][hlfir] Support mold operand for hlfir.elemental.

To properly create temporary array for a polymorphic result
of hlfir.elemental we need to keep the mold as its operand.
This patch adds just the basic support.

Reviewed By: clementval, tblah

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


  Commit: a3d560342cab50e46c024359b86716a31df452fc
      https://github.com/llvm/llvm-project/commit/a3d560342cab50e46c024359b86716a31df452fc
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/Runtime/Allocatable.h
    M flang/lib/Optimizer/Builder/Runtime/Allocatable.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
    M flang/test/HLFIR/elemental-codegen.fir

  Log Message:
  -----------
  [flang][hlfir] Codegen for polymorphic hlfir.elemental.

The polymorphic temporary array is created using the provided mold
and the shape of the hlfir.elemental. The array is allocated right away,
because it is going to be initialized element per element.

Depends on D157315

Reviewed By: clementval, tblah

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


  Commit: 7c9d3d5c7b65542e0122dd0012fcffafdfaeda2a
      https://github.com/llvm/llvm-project/commit/7c9d3d5c7b65542e0122dd0012fcffafdfaeda2a
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M flang/lib/Lower/ConvertCall.cpp
    A flang/test/Lower/HLFIR/elemental-polymorphic-merge.f90

  Log Message:
  -----------
  [flang][hlfir] Support MERGE with polymorphic arguments.

Pass the first argument as the polymorphic mold for the generated
hlfir.elemental.

Depends on D157316

Reviewed By: tblah, clementval

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


  Commit: 5a4c5c864f2c4023fdecc111b388f6fe01cf5f18
      https://github.com/llvm/llvm-project/commit/5a4c5c864f2c4023fdecc111b388f6fe01cf5f18
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M flang/lib/Lower/ConvertExprToHLFIR.cpp
    M flang/test/Lower/HLFIR/elemental-array-ops.f90

  Log Message:
  -----------
  [flang][hlfir] Support parenthesized polymorphic arrays.

The parenthesis' operand is used as a mold for the generated
hlfir.elemental.

Depends on D157316

Reviewed By: tblah, clementval

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


Compare: https://github.com/llvm/llvm-project/compare/d9c0166f12f0...5a4c5c864f2c


More information about the All-commits mailing list