[all-commits] [llvm/llvm-project] 35fc35: [flang][hlfir] Add hlfir.copy_in and hlfir.copy_ou...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Jan 25 01:46:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35fc35cc0254380253be257cf70a0cd446daecbb
      https://github.com/llvm/llvm-project/commit/35fc35cc0254380253be257cf70a0cd446daecbb
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

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

  Log Message:
  -----------
  [flang][hlfir] Add hlfir.copy_in and hlfir.copy_out codegen to FIR.

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).

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




More information about the All-commits mailing list