[llvm-branch-commits] [flang] [flang][OpenMP] use attribute for delayed privatization barrier (PR #140092)

Leandro Lupori via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 22 05:58:01 PDT 2025


================
@@ -230,8 +230,15 @@ bool DataSharingProcessor::needBarrier() {
   return false;
 }
 
-void DataSharingProcessor::insertBarrier() {
-  if (needBarrier())
+void DataSharingProcessor::insertBarrier(
+    mlir::omp::PrivateClauseOps *clauseOps) {
----------------
luporl wrote:

```suggestion
    mlir::omp::PrivateClauseOps &clauseOps) {
```
If `clauseOps` can't be NULL, it would be better to use a reference.

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


More information about the llvm-branch-commits mailing list