================ @@ -1796,36 +1918,110 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, // Allocate and initialize private variables // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTerminator()); - for (auto [privDecl, mlirPrivVar, blockArg] : - llvm::zip_equal(privateDecls, mlirPrivateVars, privateBlockArgs)) { - llvm::Type *llvmAllocType = - moduleTranslation.convertType(privDecl.getType()); - // Allocations: - builder.SetInsertPoint(allocaIP.getBlock()->getTerminator()); - llvm::Value *llvmPrivateVar = builder.CreateAlloca( - llvmAllocType, /*ArraySize=*/nullptr, "omp.private.alloc"); + // Create task variable structure + llvm::SmallVector<llvm::Value *> privateVarAllocations; ---------------- ergawy wrote:
I think this can be moved inside the context struct manager and call `createGEPsToPrivateVars` from the constructor. Just to make things a bit more self-contained whenever possible. https://github.com/llvm/llvm-project/pull/125307 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits