[all-commits] [llvm/llvm-project] 3eff3c: [flang] add memory effects interface to (hl)fir.de...

Tom Eccles via All-commits all-commits at lists.llvm.org
Mon Aug 14 03:02:19 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3eff3c041685020ca6d3a33a7d1aa1c628054539
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIRAttr.td
    M flang/include/flang/Optimizer/Dialect/FIROps.h
    M flang/include/flang/Optimizer/Dialect/FIROps.td
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td

  Log Message:
  [flang] add memory effects interface to (hl)fir.declare

These operations should have no memory effect, but doing so causes the
declare to be removed by dead code elimination if the result value is
unused. fir.declare is intended to be used to generate debug information
about variables. Debug information may still be desirable even about
unused variables, so we don't want to remove the declare operations when
performing dead code elimination.

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

  Commit: c3f060b026a1e7f4676038fffce5ee2bea1292ac
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
    M flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
    A flang/test/Analysis/AliasAnalysis/alias-analysis-4.fir

  Log Message:
  [flang] approximate alias analysis support for hlfir.designate

Add a rough alias analysis rule for hlfir.designate which just follows
the memref argument. This could be extended in the future to take into
account the indices or derived type fields accessed to spot for provably
non-overlapping cases. In the meantime, we need a flag to ensure we
never say "MustAlias" when following a value through a hlfir.designate
because the designate analysis is only approximate.

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

Compare: https://github.com/llvm/llvm-project/compare/059da566bc8a...c3f060b026a1

More information about the All-commits mailing list