[all-commits] [llvm/llvm-project] 03cef6: [flang][NFC] turn (h)fir.declare side effect into ...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Oct 23 03:33:57 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03cef62fe53d9927865f2acbde438fc35377f16e
      https://github.com/llvm/llvm-project/commit/03cef62fe53d9927865f2acbde438fc35377f16e
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-10-23 (Wed, 23 Oct 2024)

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

  Log Message:
  -----------
  [flang][NFC] turn (h)fir.declare side effect into debug ressource alloca (#113321)

See https://reviews.llvm.org/D157626 for the rational of declare having
side effects.

The write effect is to scary for passes that look for read/write effects
without caring about the resource affected. I know Slava asked for it,
but I think the creation of the `DebuggingResource` was enough and that
a write is too much. The alloca effect is sufficient to prevent DCE to
remove it, which is all we care about currently.

This currently is flag as a reason for creating LHS temporary in
assignment to vector subscripted entity with array constructor.
There is a lot of read/write side effect analysis in the
"lower-hlfir-ordered-assignments" pass, and I feel like we will just
keep adding weird "debug ressource" bypassing here and there with these
side effects.



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