[llvm-branch-commits] [clang] [flang] [llvm] [OpenMP] Delete now unused OMPD_ordered (PR #214729)
Krzysztof Parzyszek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 7 07:02:58 PDT 2026
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/214729
>From fa1661af91ca6c4ec547e5c23c38a64166599493 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Thu, 6 Aug 2026 14:03:24 -0500
Subject: [PATCH] [OpenMP] Delete now unused OMPD_ordered
It has been replaced by OMPD_ordered_standalone and
OMPD_ordered_blockassoc.
---
clang/lib/Parse/ParseOpenMP.cpp | 2 +-
flang/lib/Parser/openmp-parsers.cpp | 3 +--
flang/lib/Semantics/check-omp-structure.cpp | 3 +--
llvm/include/llvm/Frontend/OpenMP/OMP.td | 13 -------------
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 2 +-
.../Frontend/OpenMPDirectiveNameParserTest.cpp | 3 +--
6 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 616bd87124210..718c727f9b51f 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -64,7 +64,7 @@ static OpenMPDirectiveKind checkOpenMPDirectiveName(Parser &P,
unsigned Version = P.getLangOpts().OpenMP;
auto [D, VR] = getOpenMPDirectiveKindAndVersions(Name);
// "ORDERED" is parsed as OMPD_ordered_standalone.
- if (D == Directive::OMPD_ordered || D == Directive::OMPD_ordered_blockassoc)
+ if (D == Directive::OMPD_ordered_blockassoc)
D = Directive::OMPD_ordered_standalone;
assert(D == Kind && "Directive kind mismatch");
// Ignore the case Version > VR.Max: In OpenMP 6.0 all prior spellings
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index f5ab5380754c8..13ae362f8fe0b 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -211,8 +211,7 @@ struct OmpDirectiveNameParser {
OmpDirectiveName n;
// We can't tell which one "ordered" corresponds to here,
// so normalize it to OMPD_ordered_standalone.
- if (nid.second == llvm::omp::Directive::OMPD_ordered ||
- nid.second == llvm::omp::Directive::OMPD_ordered_blockassoc) {
+ if (nid.second == llvm::omp::Directive::OMPD_ordered_blockassoc) {
n.v = llvm::omp::Directive::OMPD_ordered_standalone;
} else {
n.v = nid.second;
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index db61bd636e675..94fd9ec1533bc 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -903,8 +903,7 @@ void OmpStructureChecker::CheckDirectiveSpelling(
}
llvm::StringRef name{llvm::omp::getOpenMPDirectiveName(id, v)};
auto [kind, versions]{llvm::omp::getOpenMPDirectiveKindAndVersions(name)};
- if (kind != llvm::omp::Directive::OMPD_ordered &&
- kind != llvm::omp::Directive::OMPD_ordered_blockassoc &&
+ if (kind != llvm::omp::Directive::OMPD_ordered_blockassoc &&
kind != llvm::omp::Directive::OMPD_ordered_standalone) {
assert(kind == id && "Directive kind mismatch");
}
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 8e53fc07e7b28..9ff0440272b0c 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -1083,19 +1083,6 @@ def OMP_Nothing : Directive<[Spelling<"nothing">]> {
LM_Identity,
];
}
-def OMP_Ordered : Directive<[Spelling<"ordered">]> {
- let allowedClauses = [
- VersionedClause<OMPC_Depend>,
- VersionedClause<OMPC_Doacross, 52>,
- ];
- let allowedOnceClauses = [
- VersionedClause<OMPC_Simd>,
- VersionedClause<OMPC_Threads>,
- ];
- let association = AS_None;
- // There is also a block-associated "ordered" directive.
- let category = CA_Executable;
-}
def OMP_OrderedStandalone : Directive<[Spelling<"ordered">]> {
let name = "ordered_standalone";
let allowedClauses = [
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 5a363d0ac3dbd..f1d6d28bf8361 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -8107,7 +8107,7 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createOrderedThreadsSimd(
if (!updateToLocation(Loc))
return Loc.IP;
- Directive OMPD = Directive::OMPD_ordered;
+ Directive OMPD = Directive::OMPD_ordered_blockassoc;
Instruction *EntryCall = nullptr;
Instruction *ExitCall = nullptr;
diff --git a/llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp b/llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp
index f47d80a983fbf..03f43cca583a4 100644
--- a/llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPDirectiveNameParserTest.cpp
@@ -86,8 +86,7 @@ static std::vector<omp::Directive> getDirectiveSet() {
// use one of them, otherwise the test will fail to instantiate.
std::vector<omp::Directive> Dirs;
for (omp::Directive D : llvm::omp::directives()) {
- if (D == omp::Directive::OMPD_ordered ||
- D == omp::Directive::OMPD_ordered_blockassoc)
+ if (D == omp::Directive::OMPD_ordered_blockassoc)
continue;
Dirs.push_back(D);
}
More information about the llvm-branch-commits
mailing list