[all-commits] [llvm/llvm-project] f3fa60: [flang] lower ASSOCIATED for procedure pointers (#...

jeanPerier via All-commits all-commits at lists.llvm.org
Fri Dec 22 01:59:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3fa603d7404ebca7091534bfa18fed25b099204
      https://github.com/llvm/llvm-project/commit/f3fa603d7404ebca7091534bfa18fed25b099204
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2023-12-22 (Fri, 22 Dec 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/HLFIRTools.h
    M flang/include/flang/Optimizer/Dialect/FIRType.h
    M flang/include/flang/Optimizer/HLFIR/HLFIRDialect.h
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    A flang/test/Lower/Intrinsics/associated-proc-pointers.f90

  Log Message:
  -----------
  [flang] lower ASSOCIATED for procedure pointers (#76067)

This is a lot less complex than the data case where the shape has to be
accounted for, so the implementation is done inline.

One corner case will not be supported correctly for now: the case where
POINTER and TARGET points to the same internal procedure may return
false because lowering is creating fir.embox_proc each time the address
of an internal procedure is taken, so different thunk for the same
internal procedure/host link may be created and compare to false. This
will be fixed in a later patch that moves creating of internal procedure
fir.embox_proc in the host so that the addresses are the same when the
host link is the same. This change is required to properly support the
required lifetime of internal procedure addresses anyway (should be the
always be the lifetime of the host, even when the address is taken in an
internal procedure).




More information about the All-commits mailing list