[Mlir-commits] [flang] [llvm] [mlir] [flang][MLIR][OpenMP] make reduction by-ref toggled per variable (PR #92244)

Sergio Afonso llvmlistbot at llvm.org
Thu May 16 06:27:48 PDT 2024


================
@@ -2121,9 +2121,11 @@ Function *getFreshReductionFunc(Module &M) {
                           ".omp.reduction.func", &M);
 }
 
-OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductions(
-    const LocationDescription &Loc, InsertPointTy AllocaIP,
-    ArrayRef<ReductionInfo> ReductionInfos, bool IsNoWait, bool IsByRef) {
+OpenMPIRBuilder::InsertPointTy
+OpenMPIRBuilder::createReductions(const LocationDescription &Loc,
+                                  InsertPointTy AllocaIP,
+                                  ArrayRef<ReductionInfo> ReductionInfos,
+                                  ArrayRef<bool> IsByRef, bool IsNoWait) {
   for (const ReductionInfo &RI : ReductionInfos) {
----------------
skatrak wrote:

Nit: Would be good to `assert(ReductionInfos.size() == IsByRef.size())` here

https://github.com/llvm/llvm-project/pull/92244


More information about the Mlir-commits mailing list