[all-commits] [llvm/llvm-project] 43d729: [flang][HLFIR] add more memory effects interfaces

Tom Eccles via All-commits all-commits at lists.llvm.org
Wed Sep 6 03:33:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43d729dda460b529c46f396c00d4602b50b91986
      https://github.com/llvm/llvm-project/commit/43d729dda460b529c46f396c00d4602b50b91986
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-09-06 (Wed, 06 Sep 2023)

  Changed paths:
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    A flang/test/HLFIR/memory-effects.fir
    M flang/test/HLFIR/order_assignments/where-scheduling.f90
    M flang/tools/fir-opt/CMakeLists.txt
    M flang/tools/fir-opt/fir-opt.cpp

  Log Message:
  -----------
  [flang][HLFIR] add more memory effects interfaces

Anything that produces a hlfir.expr should have an allocation side
effect so that it is not removed by CSE (which would result in two
hlfir.destroy operations for the same expression). Similarly for
hlfir.associate, which has hlfir.end_associate.

Also adds read effects on arguments which are pointer-like or boxes.

I see no regressions from this change when running llvm-testsuite with
optimization enabled, or from SPEC2017 rate benchmarks.

To test this, I have added MLIR's pass for testing side effect
interfaces to fir-opt.

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




More information about the All-commits mailing list