[flang-commits] [PATCH] D144111: [flang][hlfir] Array constructor lowering [part 2/4]

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Feb 15 08:27:24 PST 2023


jeanPerier created this revision.
jeanPerier added reviewers: clementval, PeteSteinfeld, vdonaldson, tblah.
jeanPerier added a project: Flang.
Herald added subscribers: sunshaoce, mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.

This patch adds the lowering strategy that lowers an array constructor
to an hlfir.elemental (without creating any temporary yet in lowering).
This will allow more high level array expression optimization to elide
the array constructor temporary when possible, but this is only doable
for a restricted although common form of array constructors:
"[(pure_scalar_expr(i),i=lower,upper,stride)]".

Depends on D144102 <https://reviews.llvm.org/D144102>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144111

Files:
  flang/lib/Lower/ConvertArrayConstructor.cpp
  flang/test/Lower/HLFIR/array-ctor-as-elemental.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144111.497691.patch
Type: text/x-patch
Size: 14572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230215/a8c6f574/attachment.bin>


More information about the flang-commits mailing list