[all-commits] [llvm/llvm-project] d647c3: [flang][hlfir] Add hlfir.destroy operation.

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Jan 17 02:28:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d647c3f719e700826ca618d0c63a8f93d537221a
      https://github.com/llvm/llvm-project/commit/d647c3f719e700826ca618d0c63a8f93d537221a
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  Changed paths:
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
    A flang/test/HLFIR/destroy-codegen.fir
    A flang/test/HLFIR/destroy.fir

  Log Message:
  -----------
  [flang][hlfir] Add hlfir.destroy operation.

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

Reviewed By: clementval

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




More information about the All-commits mailing list