[flang-commits] [PATCH] D107678: [flang] Implement runtime Assign()

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Aug 6 17:26:12 PDT 2021


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

Define an API for, and implement, runtime support for arbitrary
assignment of one descriptor's data to another, with full support for
(re)allocation of allocatables with finalization when necessary,
user-defined derived type assignment TBP calls, and intrinsic (default)
componentwise assignment of derived type instances with allocation of
automatic components.  Also clean up API and implementation of
finalization/destruction using knowledge gained while studying
edge cases for assignment in the 2018 standard.

The look-up procedure for special procedure bindings in derived
types has been optimized from O(N) to O(1) since it will probably
matter more.  This required some analysis in runtime derived type
description table construction in semantics and some changes to the
table schemata.

Executable Fortran tests have been developed; they'll be added
to the test base once they can be lowered and run by f18.


https://reviews.llvm.org/D107678

Files:
  flang/include/flang/Semantics/tools.h
  flang/include/flang/Semantics/type.h
  flang/lib/Semantics/runtime-type-info.cpp
  flang/lib/Semantics/tools.cpp
  flang/module/__fortran_type_info.f90
  flang/runtime/CMakeLists.txt
  flang/runtime/allocatable.cpp
  flang/runtime/allocatable.h
  flang/runtime/assign.cpp
  flang/runtime/assign.h
  flang/runtime/derived.cpp
  flang/runtime/derived.h
  flang/runtime/type-info.cpp
  flang/runtime/type-info.h
  flang/test/Semantics/typeinfo01.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107678.364913.patch
Type: text/x-patch
Size: 65319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210807/e39c7266/attachment-0001.bin>


More information about the flang-commits mailing list