[flang-commits] [flang] [mlir] [mlir][OpenMP] - MLIR to LLVMIR translation support for delayed privatization of allocatables in `omp.target` ops (PR #113208)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed Oct 23 04:16:29 PDT 2024
================
@@ -3404,7 +3506,12 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
bodyGenStatus = failure();
} else {
assert(yieldedValues.size() == 1);
- moduleTranslation.mapValue(privBlockArg, yieldedValues.front());
+ llvm::Value *llvmReplacementValue = yieldedValues.front();
+ moduleTranslation.mapValue(privBlockArg, llvmReplacementValue);
+ if (!privatizer.getDeallocRegion().empty()) {
+ llvmPrivateVars.push_back(llvmReplacementValue);
----------------
tblah wrote:
nit: maybe this should be called something like `llvmPrivateVarsNeedingCleanup` so it isn't confused with similarly named vectors in other directives that do contain all of the private variables
https://github.com/llvm/llvm-project/pull/113208
More information about the flang-commits
mailing list