Skip to content

Commit 7fc6e12

Browse files
committed
Add comment to SCF to OpenMP conversion
1 parent 7f690c4 commit 7fc6e12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,8 @@ struct ParallelOpLowering : public OpRewritePattern<scf::ParallelOp> {
469469
ArrayAttr::get(rewriter.getContext(), reductionDeclSymbols));
470470
wsloopOp.getReductionVarsMutable().append(reductionVariables);
471471
llvm::SmallVector<bool> byRefVec;
472+
// false because these reductions always reduce scalars and so do
473+
// not need to pass by reference
472474
byRefVec.resize(reductionVariables.size(), false);
473475
wsloopOp.setReductionVarsByref(
474476
DenseBoolArrayAttr::get(rewriter.getContext(), byRefVec));

0 commit comments

Comments
 (0)