[flang-commits] [PATCH] D140288: [flang] Do not convey captured globals through host link

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Dec 19 03:06:53 PST 2022


jeanPerier created this revision.
jeanPerier added reviewers: PeteSteinfeld, vdonaldson, Renaud-K.
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.

Addresses and properties (bounds, length parameters) of host
variables associated in an internal procedure were all passed via
an extra tuple argument of the internal procedure.
This extra tuple is in general an overhead: it must be created and
passed, and require creating thunks when taking the address of the
internal procedure.
This patch allows not using the tuple for host global variables
(from modules, common block, or local saved variables) since they can
be instantiated from the fir.global symbol in the internal procedure
instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140288

Files:
  flang/include/flang/Lower/HostAssociations.h
  flang/include/flang/Lower/PFTBuilder.h
  flang/lib/Lower/Bridge.cpp
  flang/lib/Lower/CallInterface.cpp
  flang/lib/Lower/HostAssociations.cpp
  flang/lib/Lower/PFTBuilder.cpp
  flang/test/Lower/explicit-interface-results-2.f90
  flang/test/Lower/host-associated-globals.f90
  flang/test/Lower/host-associated.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140288.483892.patch
Type: text/x-patch
Size: 18171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221219/79a81541/attachment-0001.bin>


More information about the flang-commits mailing list