[all-commits] [llvm/llvm-project] 0d4057: [flang] Inline hlfir.copy_in for trivial types (#1...
Kajetan Puchalski via All-commits
all-commits at lists.llvm.org
Fri Jun 6 07:10:38 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d40574e16e8b192e0b3e4caa313b42cbfb88821
https://github.com/llvm/llvm-project/commit/0d40574e16e8b192e0b3e4caa313b42cbfb88821
Author: Kajetan Puchalski <kajetan.puchalski at arm.com>
Date: 2025-06-06 (Fri, 06 Jun 2025)
Changed paths:
M flang/include/flang/Optimizer/Builder/HLFIRTools.h
M flang/include/flang/Optimizer/HLFIR/Passes.td
M flang/lib/Optimizer/Builder/HLFIRTools.cpp
M flang/lib/Optimizer/HLFIR/Transforms/CMakeLists.txt
A flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRCopyIn.cpp
M flang/lib/Optimizer/Passes/Pipelines.cpp
A flang/test/HLFIR/inline-hlfir-copy-in.fir
Log Message:
-----------
[flang] Inline hlfir.copy_in for trivial types (#138718)
hlfir.copy_in implements copying non-contiguous array slices for
functions that take in arrays required to be contiguous through
flang-rt.
For large arrays of trivial types, this can incur overhead compared to a
plain, inlined copy loop.
To address that, add a new InlineHLFIRCopyIn optimisation pass to inline
hlfir.copy_in operations for trivial types.
For the time being, the pattern is only applied in cases where the
copy-in does not require a corresponding copy-out, such as when the
function being called declares the array parameter as intent(in).
Applying this optimisation reduces the runtime of thornado-mini's
DeleptonizationProblem by about 10%.
---------
Signed-off-by: Kajetan Puchalski <kajetan.puchalski at arm.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list