[flang-commits] [flang] [lib] [OpenMC] Use references instead of pointers (PR #86000)
via flang-commits
flang-commits at lists.llvm.org
Wed Mar 20 13:07:02 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: None (matricate)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/86000.diff
1 Files Affected:
- (modified) flang/lib/Lower/OpenMP/ReductionProcessor.cpp (+2-2)
``````````diff
diff --git a/flang/lib/Lower/OpenMP/ReductionProcessor.cpp b/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
index 2477f635792a25..8d1e5c06dc16a0 100644
--- a/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
@@ -457,8 +457,8 @@ mlir::omp::DeclareReductionOp ReductionProcessor::createDeclareReduction(
{loc, loc});
builder.setInsertionPointToEnd(&decl.getReductionRegion().back());
- mlir::Value op1 = decl.getReductionRegion().front().getArgument(0);
- mlir::Value op2 = decl.getReductionRegion().front().getArgument(1);
+ mlir::Value &op1 = decl.getReductionRegion().front().getArgument(0);
+ mlir::Value &op2 = decl.getReductionRegion().front().getArgument(1);
genCombiner(builder, loc, redId, type, op1, op2, isByRef);
return decl;
``````````
</details>
https://github.com/llvm/llvm-project/pull/86000
More information about the flang-commits
mailing list