[all-commits] [llvm/llvm-project] 319f02: [flang] hlfir.associate and hlfir.end_associate co...

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Dec 1 08:59:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 319f0221eef90734a7b5fc719df07e3d5c693105
      https://github.com/llvm/llvm-project/commit/319f0221eef90734a7b5fc719df07e3d5c693105
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-12-01 (Thu, 01 Dec 2022)

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

  Log Message:
  -----------
  [flang] hlfir.associate and hlfir.end_associate codegen

Add hlfir.associate and hlfir.end_associate codegen.
To properly allow reusing the bufferized expression storage for the
newly created variable, bufferization of hlfir.expr has to be updated
so that hlfir.expr are translated to a variable and a boolean to
indicate if the variable storage needs to be freed after the expression
was used. That way the responsibility to free the bufferized expression
can be passed to the variable user, and applied in the
hlfir.end_associate.

Right now, not of the bufferized expression are heap allocated, so
generating the conditional freemem in hlfir.end_associate is left as
a TODO for when it can be tested.

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




More information about the All-commits mailing list