[flang-commits] [PATCH] D139020: [flang] hlfir.associate and hlfir.end_associate codegen
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Nov 30 08:24:54 PST 2022
jeanPerier created this revision.
jeanPerier added reviewers: clementval, PeteSteinfeld, vzakhari.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139020
Files:
flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
flang/test/HLFIR/associate-codegen.fir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139020.478966.patch
Type: text/x-patch
Size: 13614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221130/77214208/attachment.bin>
More information about the flang-commits
mailing list