[all-commits] [llvm/llvm-project] 986f83: [flang] Added fir.dummy_scope operation to preserv...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Apr 30 17:40:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 986f832cff9cfdd9fa6addfadcd93206636311ef
      https://github.com/llvm/llvm-project/commit/986f832cff9cfdd9fa6addfadcd93206636311ef
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIROps.td
    M flang/include/flang/Optimizer/Dialect/FIRTypes.td
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
    M flang/lib/Optimizer/CodeGen/TypeConverter.cpp
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
    A flang/test/Fir/dummy-scope-codegen.fir
    A flang/test/Fir/dummy_scope.fir
    M flang/test/HLFIR/declare-codegen.fir
    A flang/test/HLFIR/dummy_scope.fir
    M flang/unittests/Optimizer/FortranVariableTest.cpp

  Log Message:
  -----------
  [flang] Added fir.dummy_scope operation to preserve dummy arguments association. (#90642)

The new operation is just an abstract attribute that is attached to
[hl]fir.declare operations of dummy arguments of a subroutine.
Dummy arguments of the same subroutine refer to the same
fir.dummy_scope, so they can be recognized as such during FIR AliasAnalysis.
Note that the fir.dummy_scope must be specific to the runtime
instantiation of a subroutine, so any MLIR inlining/cloning should duplicate and
unique it vs using the same fir.dummy_scope for different runtime instantiations.
This is why I made it an operation rather than an attribute.
The new operation uses a write effect on DebuggingResource, same as
[hl]fir.declare, to avoid optimizing it away.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list