[llvm] [Frontend][OpenMP] Privatizing clauses in construct decomposition (PR #92176)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 13:55:48 PDT 2024
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/92176
Add remaining clauses with the "privatizing" property to construct decomposition, specifically to the part handling the `allocate` clause.
>From eb89b138442c1f3db9b6cf62adb46f5f4f881a29 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 14 May 2024 15:52:39 -0500
Subject: [PATCH] [Frontend][OpenMP] Privatizing clauses in construct
decomposition
Add remaining clauses with the "privatizing" property to construct
decomposition, specifically to the part handling the `allocate`
clause.
---
llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h | 5 +++++
1 file changed, 5 insertions(+)
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;
More information about the llvm-commits
mailing list