[all-commits] [llvm/llvm-project] f1d13b: [flang] add FIR to FIR pass to lower assumed-rank ...
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon May 27 02:46:02 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f1d13bbd6662969ad9e57a7938967217602636c5
https://github.com/llvm/llvm-project/commit/f1d13bbd6662969ad9e57a7938967217602636c5
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-05-27 (Mon, 27 May 2024)
Changed paths:
M flang/include/flang/Optimizer/Builder/FIRBuilder.h
M flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h
A flang/include/flang/Optimizer/Builder/Runtime/Support.h
M flang/include/flang/Optimizer/Dialect/FIRType.h
M flang/include/flang/Optimizer/Transforms/Passes.h
M flang/include/flang/Optimizer/Transforms/Passes.td
M flang/include/flang/Tools/CLOptions.inc
M flang/lib/Optimizer/Builder/CMakeLists.txt
A flang/lib/Optimizer/Builder/Runtime/Support.cpp
M flang/lib/Optimizer/Dialect/FIRType.cpp
A flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
M flang/lib/Optimizer/Transforms/CMakeLists.txt
M flang/test/Driver/bbc-mlir-pass-pipeline.f90
M flang/test/Driver/mlir-debug-pass-pipeline.f90
M flang/test/Driver/mlir-pass-pipeline.f90
M flang/test/Fir/basic-program.fir
A flang/test/Fir/rebox_assumed_rank_codegen.fir
Log Message:
-----------
[flang] add FIR to FIR pass to lower assumed-rank operations (#93344)
Add pass to lower assumed-rank operations. The current patch adds
codegen for fir.rebox_assumed_rank. It will be the pass lowering
fir.select_rank.
fir.rebox_assumed_rank is lowered to a call to CopyAndUpdateDescriptor
runtime API.
Note that the lowering ends-up allocating two new descriptors at the
LLVM level (one alloca created by the pass for the CopyAndUpdateDescriptor
result descriptor argument, the second one is created by the fir.load
of the result descriptor in codegen).
LLVM is currently unable to properly optimize and merge those allocas.
The "nocapture" attribute added to CopyAndUpdateDescriptor arguments
gives part of the information to LLVM, but the fir.load codegen of
descriptors must be updated to use llvm.memcpy instead of
llvm.load+store to allow LLVM to optimize it. This will be done in later patch.
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