[Mlir-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)
Sergio Afonso
llvmlistbot at llvm.org
Mon Mar 31 06:44:29 PDT 2025
================
@@ -1018,19 +1017,31 @@ allocReductionVars(T loop, ArrayRef<BlockArgument> reductionArgs,
// variable allocated in the inlined region)
llvm::Value *var = builder.CreateAlloca(
moduleTranslation.convertType(reductionDecls[i].getType()));
- deferredStores.emplace_back(phis[0], var);
- privateReductionVariables[i] = var;
- moduleTranslation.mapValue(reductionArgs[i], phis[0]);
- reductionVariableMap.try_emplace(loop.getReductionVars()[i], phis[0]);
+ llvm::Type *ptrTy = llvm::PointerType::getUnqual(builder.getContext());
----------------
skatrak wrote:
Nit: It's a bit simpler, I think. Same thing in the 'else'.
```suggestion
llvm::Type *ptrTy = builder.getPtrTy();
```
https://github.com/llvm/llvm-project/pull/133310
More information about the Mlir-commits
mailing list