[all-commits] [llvm/llvm-project] 47025a: [flang][hlfir] Alias analysis for host associated ...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Mon Sep 18 09:59:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47025af6399aa29a045275349b04aaffaa918d1b
      https://github.com/llvm/llvm-project/commit/47025af6399aa29a045275349b04aaffaa918d1b
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M flang/include/flang/Lower/ConvertVariable.h
    M flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
    M flang/include/flang/Optimizer/Dialect/FIRAttr.td
    M flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/ConvertVariable.cpp
    M flang/lib/Lower/HostAssociations.cpp
    M flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
    A flang/test/Analysis/AliasAnalysis/alias-analysis-host-assoc.fir
    M flang/test/Lower/HLFIR/internal-procedures.f90

  Log Message:
  -----------
  [flang][hlfir] Alias analysis for host associated accesses. (#65919)

This patch adds `host_assoc` attribute for operations that implement
FortranVariableInterface (e.g. `hlfir.declare`). The attribute is used
by the alias analysis to make better conclusions about memory overlap.
For example, a dummy argument of an inner subroutine and a host's
variable used inside the inner subroutine cannot refer to the same
object (if the dummy argument does not satisify exceptions in F2018
15.5.2.13).
This closes a performance gap between HLFIR optimization pipeline
and FIR ArrayValueCopy for Polyhedron/nf.




More information about the All-commits mailing list