[flang-commits] [PATCH] D141841: [flang] Lower elemental and transformational clean-up in HLFIR
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jan 16 05:16:04 PST 2023
jeanPerier created this revision.
jeanPerier added reviewers: clementval, PeteSteinfeld.
Herald added subscribers: sunshaoce, mehdi_amini.
Herald added projects: Flang, All.
jeanPerier requested review of this revision.
Herald added a subscriber: jdoerfert.
In lowering to hlfir, no clean-up was added yet for
the created hlfir.elemental. Add the needed hlfir.destroy.
Regarding transformational lowering, clean-ups were created because
they are lowered in memory, but this is inconvenient because this
prevented lowering to hlfir from "moving" the created variable to
an expression. Add a new entry point in IntrinsicCall.h that keeps
track of whether or not the returned storage needs to be deallocated,
but does not insert the deallocation in the StatementContext.
This allows using the newly added hlfir.as_expr "move" aspect to be
used and save creating a copy.
Depends on D141839 <https://reviews.llvm.org/D141839>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141841
Files:
flang/include/flang/Lower/IntrinsicCall.h
flang/lib/Lower/ConvertCall.cpp
flang/lib/Lower/ConvertExprToHLFIR.cpp
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/HLFIR/elemental-array-ops.f90
flang/test/Lower/HLFIR/elemental-intrinsics.f90
flang/test/Lower/HLFIR/elemental-user-procedure-ref.f90
flang/test/Lower/HLFIR/transformational.f90
flang/test/Lower/Intrinsics/transfer.f90
flang/test/Lower/Intrinsics/verify.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141841.489513.patch
Type: text/x-patch
Size: 24942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230116/4dc4212b/attachment-0001.bin>
More information about the flang-commits
mailing list