Skip to content

[LLVM][OpenMP] Add older versions to llvm::omp::getOpenMPVersions #138967

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

kparzysz
Copy link
Contributor

@kparzysz kparzysz commented May 7, 2025

Add 3.1 and 4.0 as versions. This will make flang's default OpenMP version (3.1) be included in the list.

Add 3.1 and 4.0 as versions. This will make flang's default OpenMP
version (3.1) be included in the list.
@llvmbot llvmbot added flang:openmp clang:openmp OpenMP related changes to Clang labels May 7, 2025
@llvmbot
Copy link
Member

llvmbot commented May 7, 2025

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

Changes

Add 3.1 and 4.0 as versions. This will make flang's default OpenMP version (3.1) be included in the list.


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

1 Files Affected:

  • (modified) llvm/lib/Frontend/OpenMP/OMP.cpp (+1-1)
diff --git a/llvm/lib/Frontend/OpenMP/OMP.cpp b/llvm/lib/Frontend/OpenMP/OMP.cpp
index 2792dc4281015..555e2a61e411e 100644
--- a/llvm/lib/Frontend/OpenMP/OMP.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMP.cpp
@@ -190,7 +190,7 @@ bool isCombinedConstruct(Directive D) {
 }
 
 ArrayRef<unsigned> getOpenMPVersions() {
-  static unsigned Versions[]{45, 50, 51, 52, 60};
+  static unsigned Versions[]{31, 40, 45, 50, 51, 52, 60};
   return Versions;
 }
 

Copy link
Contributor

@mjklemm mjklemm left a comment

Choose a reason for hiding this comment

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

LGTM

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

@kparzysz kparzysz merged commit 5b29058 into main May 8, 2025
26 of 28 checks passed
@kparzysz kparzysz deleted the users/kparzysz/spr/v01-omp-version branch May 8, 2025 12:23
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.

4 participants