[flang-commits] [PATCH] D141669: [flang][NFC] centralize FreeMemOp generation in IntrinsicCall.cpp

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jan 13 01:50:07 PST 2023


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

The current intrinsic call lowering contains a lot of repetitive
patterns when it comes to dealing with temporary allocatable
results allocated by the runtime that need to be dereferenced and
for which a clean-up (free) must be scheduled in the StatementContext.

For HLFIR lowering, I will need to deal with the clean-up in a different
way since the results will be "moved" into expression nodes and
the clean-up will be inserted in bufferization after the last hlfir.expr
usage. Centralizing the clean-up code will make that easier, and is
regardless of this motivation a quality improvement.

Some static helpers had to be moved to IntrinsicBuilder method so that
they could call the readAndAddCleanUp code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141669

Files:
  flang/lib/Lower/IntrinsicCall.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141669.488908.patch
Type: text/x-patch
Size: 36555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230113/8c417523/attachment-0001.bin>


More information about the flang-commits mailing list