[all-commits] [llvm/llvm-project] ef4fbb: [flang][OpenACC] add pass to bufferize fir.box rec...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Oct 16 00:25:45 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef4fbb55b2d4b2899eb1c8bb50ece18de4015c30
https://github.com/llvm/llvm-project/commit/ef4fbb55b2d4b2899eb1c8bb50ece18de4015c30
Author: jeanPerier <jperier at nvidia.com>
Date: 2025-10-16 (Thu, 16 Oct 2025)
Changed paths:
M flang/include/flang/Optimizer/CMakeLists.txt
A flang/include/flang/Optimizer/OpenACC/CMakeLists.txt
A flang/include/flang/Optimizer/OpenACC/Passes.h
A flang/include/flang/Optimizer/OpenACC/Passes.td
M flang/lib/Optimizer/OpenACC/CMakeLists.txt
A flang/lib/Optimizer/OpenACC/Transforms/ACCRecipeBufferization.cpp
A flang/lib/Optimizer/OpenACC/Transforms/CMakeLists.txt
A flang/test/Fir/OpenACC/recipe-bufferization.mlir
M flang/tools/fir-opt/CMakeLists.txt
M flang/tools/fir-opt/fir-opt.cpp
Log Message:
-----------
[flang][OpenACC] add pass to bufferize fir.box recipes (#163543)
When working on privatization, it is easier to work with fir.box
explicitly in memory, otherwise, there is no way to express that the
fir.box will end-up being a descriptor address in FIR which makes it
hard to deal with data management.
However, introducing fir.ref<fir.box> early can pessimize early HLFIR
optimization because it is harder to reason about the aliasing of
`fir.ref<fir.box>` because of the extra memory indirection.
This patch introduces a pass that turns acc `!fir.box<T>` recipes into
`!fir.ref<!fir.box<T>>` recipes and updated the related recipe usages to
use `!fir.ref<!fir.box<T>>` (creating new alloca+store+load).
It is added to flang and not OpenACC because it is specific to the
`fir.box` type, so it makes little sense to make it an OpenACC generic
pass and to create a new OpenACC dialect type interface for this use
case.
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