[llvm] [Frontend][OpenMP] Privatizing clauses in construct decomposition (PR #92176)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 13:56:23 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

<details>
<summary>Changes</summary>

Add remaining clauses with the "privatizing" property to construct decomposition, specifically to the part handling the `allocate` clause.

---
Full diff: https://github.com/llvm/llvm-project/pull/92176.diff


1 Files Affected:

- (modified) llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h (+5) 


``````````diff
diff --git a/llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h b/llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
index 5f12c62b832fc..02c88a58e0993 100644
--- a/llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
+++ b/llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
@@ -793,9 +793,14 @@ bool ConstructDecompositionT<C, H>::applyClause(
   // [5.2:340:33]
   auto canMakePrivateCopy = [](llvm::omp::Clause id) {
     switch (id) {
+    // Clauses with "privatization" property:
     case llvm::omp::Clause::OMPC_firstprivate:
+    case llvm::omp::Clause::OMPC_in_reduction:
     case llvm::omp::Clause::OMPC_lastprivate:
+    case llvm::omp::Clause::OMPC_linear:
     case llvm::omp::Clause::OMPC_private:
+    case llvm::omp::Clause::OMPC_reduction:
+    case llvm::omp::Clause::OMPC_task_reduction:
       return true;
     default:
       return false;

``````````

</details>


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


More information about the llvm-commits mailing list