Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Frontend][OpenMP] Privatizing clauses in construct decomposition #92176

Merged
merged 5 commits into from
May 15, 2024

Conversation

kparzysz
Copy link
Contributor

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

Add remaining clauses with the "privatizing" property to construct
decomposition, specifically to the part handling the `allocate`
clause.
@llvmbot
Copy link
Collaborator

llvmbot commented May 14, 2024

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

Changes

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 --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;

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we could test this?

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

llvm/unittests/Frontend/OpenMPDecompositionTest.cpp Outdated Show resolved Hide resolved
@kparzysz kparzysz merged commit 4ec4a8e into llvm:main May 15, 2024
3 of 4 checks passed
@kparzysz kparzysz deleted the users/kparzysz/privatizing-clauses branch May 15, 2024 14:04
mub-at-arm pushed a commit to mub-at-arm/llvm-project that referenced this pull request May 16, 2024
…vm#92176)

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

---------

Co-authored-by: Tom Eccles <t@freedommail.info>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:openmp OpenMP related changes to Clang flang:openmp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants