[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)
Jan Leyonberg via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 3 09:08:10 PDT 2025
================
@@ -4161,6 +4247,37 @@ convertOmpDistribute(Operation &opInst, llvm::IRBuilderBase &builder,
if (failed(checkImplementationStatus(opInst)))
return failure();
+ /// Process teams op reduction in distribute if the reduction is contained in
+ /// the distribute op.
+ omp::TeamsOp teamsOp = opInst.getParentOfType<omp::TeamsOp>();
+ bool doDistributeReduction =
+ teamsOp ? teamsReductionContainedInDistribute(teamsOp) : false;
+
+ DenseMap<Value, llvm::Value *> reductionVariableMap;
----------------
jsjodin wrote:
I can make a separate cleanup PR for this to make this one smaller.
https://github.com/llvm/llvm-project/pull/133310
More information about the llvm-commits
mailing list