[flang-commits] [flang] [flang][OpenMP] Follow-up to build-breakage fix (PR #102028)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Mon Aug 5 11:04:05 PDT 2024


https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/102028

Adjust the handling of a few of the new clauses.

>From 14926939a1e7c6abdea7a035dcac4a0651e0eb55 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Mon, 5 Aug 2024 12:58:02 -0500
Subject: [PATCH] [flang][OpenMP] Follow-up to build-breakage fix

Adjust the handling of a few of the new clauses.
---
 flang/lib/Lower/OpenMP/Clauses.cpp | 30 ++++++------------------------
 flang/lib/Lower/OpenMP/Clauses.h   |  1 +
 2 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/flang/lib/Lower/OpenMP/Clauses.cpp b/flang/lib/Lower/OpenMP/Clauses.cpp
index 256a603014e49..fdb878fd28752 100644
--- a/flang/lib/Lower/OpenMP/Clauses.cpp
+++ b/flang/lib/Lower/OpenMP/Clauses.cpp
@@ -218,9 +218,9 @@ MAKE_EMPTY_CLASS(Full, Full);
 MAKE_EMPTY_CLASS(Inbranch, Inbranch);
 MAKE_EMPTY_CLASS(Mergeable, Mergeable);
 MAKE_EMPTY_CLASS(Nogroup, Nogroup);
-// MAKE_EMPTY_CLASS(NoOpenmp, );         // missing-in-parser
-// MAKE_EMPTY_CLASS(NoOpenmpRoutines, ); // missing-in-parser
-// MAKE_EMPTY_CLASS(NoParallelism, );    // missing-in-parser
+MAKE_EMPTY_CLASS(NoOpenmp, NoOpenmp);
+MAKE_EMPTY_CLASS(NoOpenmpRoutines, NoOpenmpRoutines);
+MAKE_EMPTY_CLASS(NoParallelism, NoParallelism);
 MAKE_EMPTY_CLASS(Notinbranch, Notinbranch);
 MAKE_EMPTY_CLASS(Nowait, Nowait);
 MAKE_EMPTY_CLASS(OmpxAttribute, OmpxAttribute);
@@ -321,7 +321,6 @@ ReductionOperator makeReductionOperator(const parser::OmpReductionOperator &inp,
 // --------------------------------------------------------------------
 // Actual clauses. Each T (where tomp::T exists in ClauseT) has its "make".
 
-// Absent: missing-in-parser
 Absent make(const parser::OmpClause::Absent &inp,
             semantics::SemanticsContext &semaCtx) {
   llvm_unreachable("Unimplemented: absent");
@@ -450,7 +449,6 @@ Collapse make(const parser::OmpClause::Collapse &inp,
 
 // Compare: empty
 
-// Contains: missing-in-parser
 Contains make(const parser::OmpClause::Contains &inp,
               semantics::SemanticsContext &semaCtx) {
   llvm_unreachable("Unimplemented: contains");
@@ -714,7 +712,6 @@ Hint make(const parser::OmpClause::Hint &inp,
   return Hint{/*HintExpr=*/makeExpr(inp.v, semaCtx)};
 }
 
-// Holds: missing-in-parser
 Holds make(const parser::OmpClause::Holds &inp,
            semantics::SemanticsContext &semaCtx) {
   llvm_unreachable("Unimplemented: holds");
@@ -897,24 +894,9 @@ Nontemporal make(const parser::OmpClause::Nontemporal &inp,
   return Nontemporal{/*List=*/makeList(inp.v, makeObjectFn(semaCtx))};
 }
 
-// NoOpenmp: missing-in-parser
-NoOpenmp make(const parser::OmpClause::NoOpenmp &inp,
-              semantics::SemanticsContext &semaCtx) {
-  llvm_unreachable("Unimplemented: no_openmp");
-}
-
-// NoOpenmpRoutines: missing-in-parser
-NoOpenmpRoutines make(const parser::OmpClause::NoOpenmpRoutines &inp,
-                      semantics::SemanticsContext &semaCtx) {
-  llvm_unreachable("Unimplemented: no_openmp_routines");
-}
-
-// NoParallelism: missing-in-parser
-NoParallelism make(const parser::OmpClause::NoParallelism &inp,
-                   semantics::SemanticsContext &semaCtx) {
-  llvm_unreachable("Unimplemented: no_parallelism");
-}
-
+// NoOpenmp: empty
+// NoOpenmpRoutines: empty
+// NoParallelism: empty
 // Notinbranch: empty
 
 Novariants make(const parser::OmpClause::Novariants &inp,
diff --git a/flang/lib/Lower/OpenMP/Clauses.h b/flang/lib/Lower/OpenMP/Clauses.h
index c7874935d8605..26e678888203e 100644
--- a/flang/lib/Lower/OpenMP/Clauses.h
+++ b/flang/lib/Lower/OpenMP/Clauses.h
@@ -177,6 +177,7 @@ using Capture = tomp::clause::CaptureT<TypeTy, IdTy, ExprTy>;
 using Collapse = tomp::clause::CollapseT<TypeTy, IdTy, ExprTy>;
 using Contains = tomp::clause::ContainsT<TypeTy, IdTy, ExprTy>;
 using Compare = tomp::clause::CompareT<TypeTy, IdTy, ExprTy>;
+using Contains = tomp::clause::ContainsT<TypeTy, IdTy, ExprTy>;
 using Copyin = tomp::clause::CopyinT<TypeTy, IdTy, ExprTy>;
 using Copyprivate = tomp::clause::CopyprivateT<TypeTy, IdTy, ExprTy>;
 using Defaultmap = tomp::clause::DefaultmapT<TypeTy, IdTy, ExprTy>;



More information about the flang-commits mailing list