[flang-commits] [PATCH] D144411: [flang][runtime] Add API to help with the difficult array constructor cases

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Feb 20 09:18:30 PST 2023


jeanPerier created this revision.
jeanPerier added reviewers: PeteSteinfeld, klausler.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a reviewer: sscalpone.
Herald added a project: All.
jeanPerier requested review of this revision.

This runtime API can be used to lower any flavor of array constructors,
but is mainly intended to be used with:

- array constructors for which the extent or length parameters cannot be computed without lowering some ac-value or ac-implied-do-control that cannot be pre-evaluated.

- array constructors of a derived type with allocatable component where copy is not trivial or PDTS.

Example of use cases:

- `[((i+j,i=1, ifoo()), j=1,n)]` where ifoo() is not pure.
- `[return_allocatable_array(), return_allocatable_array()]`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144411

Files:
  flang/include/flang/Runtime/array-constructor.h
  flang/lib/Lower/ConvertArrayConstructor.cpp
  flang/runtime/CMakeLists.txt
  flang/runtime/array-constructor.cpp
  flang/unittests/Runtime/ArrayConstructor.cpp
  flang/unittests/Runtime/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144411.498888.patch
Type: text/x-patch
Size: 23474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230220/8eaabff4/attachment-0001.bin>


More information about the flang-commits mailing list