[all-commits] [llvm/llvm-project] 93129c: [flang] Do not convey captured globals through hos...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Dec 20 04:53:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 93129ca8d1cf618390a16e5d4315d0fd15170c51
      https://github.com/llvm/llvm-project/commit/93129ca8d1cf618390a16e5d4315d0fd15170c51
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-12-20 (Tue, 20 Dec 2022)

  Changed paths:
    M flang/include/flang/Lower/CallInterface.h
    M flang/include/flang/Lower/HostAssociations.h
    M flang/include/flang/Lower/PFTBuilder.h
    M flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/CallInterface.cpp
    M flang/lib/Lower/HostAssociations.cpp
    M flang/lib/Lower/PFTBuilder.cpp
    M flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp
    M flang/test/Lower/explicit-interface-results-2.f90
    M flang/test/Lower/host-associated-functions.f90
    A flang/test/Lower/host-associated-globals.f90
    M flang/test/Lower/host-associated.f90
    M flang/test/Lower/polymorphic.f90

  Log Message:
  -----------
  [flang] Do not convey captured globals through host link

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.
Add a fir.internal_proc attribute to mlir::FuncOp for internal procedures
so that ArrayValueCopy can still detect internal procedures even if they
do not have a tuple argument.

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




More information about the All-commits mailing list