[flang-commits] [PATCH] D142475: [flang][hlfir] Add hlfir.copy_in and hlfir.copy_out codegen to FIR.

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jan 24 07:38:50 PST 2023


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

Use runtime Assign to deal with the copy (and the temporary creation, so
that this code can deal with polymorphic temps without any change).

Using Assign for the copy is desired here since the copy happens when
the data is not contiguous, and it happens inside an if/then which
makes it hard to optimize.
See https://github.com/llvm/llvm-project/commit/2b60ed405b8110b20ab2e383839759ea34003127
for more details (note that, contrary to this last commit, the code at
hand is only dealing with copy-in/copy-out, it is not intended to deal
with preparing VALUE arguments).

Depends on D142342 <https://reviews.llvm.org/D142342>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142475

Files:
  flang/include/flang/Optimizer/Builder/FIRBuilder.h
  flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
  flang/test/HLFIR/copy-in-out-codegen.fir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142475.491794.patch
Type: text/x-patch
Size: 17805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230124/e9deacd6/attachment-0001.bin>


More information about the flang-commits mailing list