[flang] [llvm] [mlir] [mlir][OpenMP] - MLIR to LLVMIR translation support for delayed privatization of allocatables in `omp.target` ops (PR #116576)
Sergio Afonso via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 02:55:25 PST 2024
================
@@ -3829,6 +3863,17 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
bool isTargetDevice = ompBuilder->Config.isTargetDevice();
auto parentFn = opInst.getParentOfType<LLVM::LLVMFuncOp>();
auto &targetRegion = targetOp.getRegion();
+ // Holds the private vars that have been mapped along with the block argument
+ // that corresponds to the MapInfoOp corresponding to the private var in
+ // question. So, for instance:
+ //
+ // %10 = omp.map.info var_ptr(%6#0 : !fir.ref<!fir.box<!fir.heap<i32>>>, ..)
+ // omp.target map_entries(%10 -> %arg0) private(@box.privatizer %6#0-> %arg1)
+ //
+ // Then, %10 has been created so that the descriptor can be used by the
+ // privatizer @box.privatizer on the device side. Here we'd record {%6#0, 0}
----------------
skatrak wrote:
```suggestion
// privatizer @box.privatizer on the device side. Here we'd record {%6#0, %arg0}
```
https://github.com/llvm/llvm-project/pull/116576
More information about the llvm-commits
mailing list