[flang-commits] [PATCH] D141839: [flang][hlfir] Add hlfir.destroy operation.

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jan 16 04:10:04 PST 2023


jeanPerier created this revision.
jeanPerier added reviewers: clementval, vzakhari, PeteSteinfeld.
Herald added subscribers: sunshaoce, mehdi_amini.
Herald added projects: Flang, All.
jeanPerier requested review of this revision.
Herald added a subscriber: jdoerfert.

Add the operation to mark the end of life of hlfir.expr.
As described in its description this is the easiest solution
to deploy given lowering "knows" where expression value are last
used.
However, inserting these points in lowering will probably make
it harder to do some IR transformation that would move the code
using or creating hlfir.expr (no use should be moved after an
hlfir.destroy).
Once the dust settle with the HLFIR change, it will be worth assessing
the situation and see if an analysis could do a better and safer job at
finding those destruction points.

Depends on D141832 <https://reviews.llvm.org/D141832>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141839

Files:
  flang/include/flang/Optimizer/HLFIR/HLFIROps.td
  flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
  flang/test/HLFIR/destroy-codegen.fir
  flang/test/HLFIR/destroy.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141839.489497.patch
Type: text/x-patch
Size: 13102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230116/564caa05/attachment-0001.bin>


More information about the flang-commits mailing list