[all-commits] [llvm/llvm-project] 0e3fda: [flang][hlfir] allow assoicate where the expr is a...

Tom Eccles via All-commits all-commits at lists.llvm.org
Fri Jul 7 02:26:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e3fda6c72e3f04046df42f1eb1ad1519a8015ec
      https://github.com/llvm/llvm-project/commit/0e3fda6c72e3f04046df42f1eb1ad1519a8015ec
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
    M flang/test/HLFIR/associate-codegen.fir

  Log Message:
  -----------
  [flang][hlfir] allow assoicate where the expr is also used by shape_of

This fixes the majority of cases where we hit the "hlfir.associate of
hlfir.expr with more than one use" TODO. In particular, this allows cam4
to be built.

hlfir.shape_of is just a way to delay reading shape information until
after intrinsics have been lowered to FIR runtime calls. It gets the
shape information from reading existing SSA values (e.g. fetching the
shape used when hlfir.declare'ing the variable).

Therefore hlfir.shape_of doesn't affect decisions about when to
deallocate the buffer.

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




More information about the All-commits mailing list