[Mlir-commits] [mlir] [MLIR][OpenMP] Fix MLIR->LLVM value matching in privatization logic (PR #103718)
Leandro Lupori
llvmlistbot at llvm.org
Fri Aug 16 05:58:17 PDT 2024
================
@@ -1424,35 +1424,107 @@ convertOmpParallel(omp::ParallelOp opInst, llvm::IRBuilderBase &builder,
}
};
- SmallVector<omp::PrivateClauseOp> privatizerClones;
- SmallVector<llvm::Value *> privateVariables;
+ SmallVector<omp::PrivateClauseOp> mlirPrivatizerClones;
+ SmallVector<llvm::Value *> llvmPrivateVars;
// TODO: Perform appropriate actions according to the data-sharing
// attribute (shared, private, firstprivate, ...) of variables.
// Currently shared and private are supported.
auto privCB = [&](InsertPointTy allocaIP, InsertPointTy codeGenIP,
- llvm::Value &, llvm::Value &vPtr,
- llvm::Value *&replacementValue) -> InsertPointTy {
- replacementValue = &vPtr;
+ llvm::Value &, llvm::Value &llvmOmpRegionInputPtr,
----------------
luporl wrote:
This is a question only: in this context, should I understand `llvmOmpRegionInputPtr` as an input, that is an LLVM pointer, in the OpenMP region being translated, that must be replaced with `llvmReplacementValue`?
But if so, won't it point to the result of a load sometimes, which is not a pointer? Or should I interpret it as "argument that points to the input value that must be replaced"?
https://github.com/llvm/llvm-project/pull/103718
More information about the Mlir-commits
mailing list