[all-commits] [llvm/llvm-project] 86b44f: [flang][openacc] Added acc::RecipeInterface for ge...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Mon Oct 9 10:50:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86b44f3760b05df7cd13110a1bca3d9170552185
https://github.com/llvm/llvm-project/commit/86b44f3760b05df7cd13110a1bca3d9170552185
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths:
M flang/include/flang/Optimizer/HLFIR/Passes.td
M flang/lib/Optimizer/Builder/FIRBuilder.cpp
A flang/test/HLFIR/convert-assign-inside-openacc-recipe.fir
M mlir/include/mlir/Dialect/OpenACC/CMakeLists.txt
M mlir/include/mlir/Dialect/OpenACC/OpenACC.h
A mlir/include/mlir/Dialect/OpenACC/OpenACCInterfaces.h
M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
A mlir/include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td
M mlir/lib/Dialect/OpenACC/CMakeLists.txt
M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
Log Message:
-----------
[flang][openacc] Added acc::RecipeInterface for getting alloca insertion point. (#68464)
Conversion of `hlfir.assign` operations inside OpenACC recipe operations
may result in `fir.alloca` insertion. FIRBuilder can only handle
alloca insertion inside FuncOp's and outlineable OpenMP operations.
I added a simple interface for OpenACC recipe operations that have
executable code inside all their regions, and alloca may be inserted
into the entry blocks of those regions always.
With our current approach the OptimizedBufferization pass is supposed
to lower these `hlfir.assign` operations into loops, because there
should not be conflicts between lhs/rhs. The pass is currently
only working on FuncOp, and this is why it does not optimize
`hlfir.assign` inside the recipes. I will fix it in a separate commit.
Since we run OptimizedBufferization only at >O0, these changes
should still be useful.
Note that the OpenACC codegen that applies the recipes should be aware
of potential alloca operations and produce appropriate stack clean-ups.
More information about the All-commits
mailing list