Skip to content

Commit 55bc6ab

Browse files
committed
[flang][OpenMP] Minimal fix for flang build after 'omp assume' patch
This patch restores the flang build, which was inadvertently broken by the patch to implement 'omp assume' support (a42e515). Thanks to Maxim Kuvyrkov and the Linaro auto-tester for the heads-up.
1 parent b4ac7f4 commit 55bc6ab

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ ReductionOperator makeReductionOperator(const parser::OmpReductionOperator &inp,
322322
// Actual clauses. Each T (where tomp::T exists in ClauseT) has its "make".
323323

324324
// Absent: missing-in-parser
325+
Absent make(const parser::OmpClause::Absent &inp,
326+
semantics::SemanticsContext &semaCtx) {
327+
llvm_unreachable("Unimplemented: absent");
328+
}
329+
325330
// AcqRel: empty
326331
// Acquire: empty
327332
// AdjustArgs: incomplete
@@ -444,7 +449,12 @@ Collapse make(const parser::OmpClause::Collapse &inp,
444449
}
445450

446451
// Compare: empty
452+
447453
// Contains: missing-in-parser
454+
Contains make(const parser::OmpClause::Contains &inp,
455+
semantics::SemanticsContext &semaCtx) {
456+
llvm_unreachable("Unimplemented: contains");
457+
}
448458

449459
Copyin make(const parser::OmpClause::Copyin &inp,
450460
semantics::SemanticsContext &semaCtx) {
@@ -705,6 +715,10 @@ Hint make(const parser::OmpClause::Hint &inp,
705715
}
706716

707717
// Holds: missing-in-parser
718+
Holds make(const parser::OmpClause::Holds &inp,
719+
semantics::SemanticsContext &semaCtx) {
720+
llvm_unreachable("Unimplemented: holds");
721+
}
708722

709723
If make(const parser::OmpClause::If &inp,
710724
semantics::SemanticsContext &semaCtx) {
@@ -884,8 +898,23 @@ Nontemporal make(const parser::OmpClause::Nontemporal &inp,
884898
}
885899

886900
// NoOpenmp: missing-in-parser
901+
NoOpenmp make(const parser::OmpClause::NoOpenmp &inp,
902+
semantics::SemanticsContext &semaCtx) {
903+
llvm_unreachable("Unimplemented: no_openmp");
904+
}
905+
887906
// NoOpenmpRoutines: missing-in-parser
907+
NoOpenmpRoutines make(const parser::OmpClause::NoOpenmpRoutines &inp,
908+
semantics::SemanticsContext &semaCtx) {
909+
llvm_unreachable("Unimplemented: no_openmp_routines");
910+
}
911+
888912
// NoParallelism: missing-in-parser
913+
NoParallelism make(const parser::OmpClause::NoParallelism &inp,
914+
semantics::SemanticsContext &semaCtx) {
915+
llvm_unreachable("Unimplemented: no_parallelism");
916+
}
917+
889918
// Notinbranch: empty
890919

891920
Novariants make(const parser::OmpClause::Novariants &inp,

flang/lib/Lower/OpenMP/Clauses.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ using ReductionOperator = tomp::type::ReductionIdentifierT<IdTy, ExprTy>;
159159
// These clauses are still handled here to cover all alternatives in the
160160
// main clause variant.
161161

162+
using Absent = tomp::clause::AbsentT<TypeTy, IdTy, ExprTy>;
162163
using AcqRel = tomp::clause::AcqRelT<TypeTy, IdTy, ExprTy>;
163164
using Acquire = tomp::clause::AcquireT<TypeTy, IdTy, ExprTy>;
164165
using AdjustArgs = tomp::clause::AdjustArgsT<TypeTy, IdTy, ExprTy>;
@@ -174,6 +175,7 @@ using At = tomp::clause::AtT<TypeTy, IdTy, ExprTy>;
174175
using Bind = tomp::clause::BindT<TypeTy, IdTy, ExprTy>;
175176
using Capture = tomp::clause::CaptureT<TypeTy, IdTy, ExprTy>;
176177
using Collapse = tomp::clause::CollapseT<TypeTy, IdTy, ExprTy>;
178+
using Contains = tomp::clause::ContainsT<TypeTy, IdTy, ExprTy>;
177179
using Compare = tomp::clause::CompareT<TypeTy, IdTy, ExprTy>;
178180
using Copyin = tomp::clause::CopyinT<TypeTy, IdTy, ExprTy>;
179181
using Copyprivate = tomp::clause::CopyprivateT<TypeTy, IdTy, ExprTy>;
@@ -199,6 +201,7 @@ using Full = tomp::clause::FullT<TypeTy, IdTy, ExprTy>;
199201
using Grainsize = tomp::clause::GrainsizeT<TypeTy, IdTy, ExprTy>;
200202
using HasDeviceAddr = tomp::clause::HasDeviceAddrT<TypeTy, IdTy, ExprTy>;
201203
using Hint = tomp::clause::HintT<TypeTy, IdTy, ExprTy>;
204+
using Holds = tomp::clause::HoldsT<TypeTy, IdTy, ExprTy>;
202205
using If = tomp::clause::IfT<TypeTy, IdTy, ExprTy>;
203206
using Inbranch = tomp::clause::InbranchT<TypeTy, IdTy, ExprTy>;
204207
using Inclusive = tomp::clause::InclusiveT<TypeTy, IdTy, ExprTy>;
@@ -213,6 +216,9 @@ using Map = tomp::clause::MapT<TypeTy, IdTy, ExprTy>;
213216
using Match = tomp::clause::MatchT<TypeTy, IdTy, ExprTy>;
214217
using Mergeable = tomp::clause::MergeableT<TypeTy, IdTy, ExprTy>;
215218
using Message = tomp::clause::MessageT<TypeTy, IdTy, ExprTy>;
219+
using NoOpenmp = tomp::clause::NoOpenmpT<TypeTy, IdTy, ExprTy>;
220+
using NoOpenmpRoutines = tomp::clause::NoOpenmpRoutinesT<TypeTy, IdTy, ExprTy>;
221+
using NoParallelism = tomp::clause::NoParallelismT<TypeTy, IdTy, ExprTy>;
216222
using Nocontext = tomp::clause::NocontextT<TypeTy, IdTy, ExprTy>;
217223
using Nogroup = tomp::clause::NogroupT<TypeTy, IdTy, ExprTy>;
218224
using Nontemporal = tomp::clause::NontemporalT<TypeTy, IdTy, ExprTy>;

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,10 +2220,12 @@ void OmpStructureChecker::Enter(const parser::OmpClause &x) {
22202220
}
22212221

22222222
// Following clauses do not have a separate node in parse-tree.h.
2223+
CHECK_SIMPLE_CLAUSE(Absent, OMPC_absent)
22232224
CHECK_SIMPLE_CLAUSE(AcqRel, OMPC_acq_rel)
22242225
CHECK_SIMPLE_CLAUSE(Acquire, OMPC_acquire)
22252226
CHECK_SIMPLE_CLAUSE(Affinity, OMPC_affinity)
22262227
CHECK_SIMPLE_CLAUSE(Capture, OMPC_capture)
2228+
CHECK_SIMPLE_CLAUSE(Contains, OMPC_contains)
22272229
CHECK_SIMPLE_CLAUSE(Default, OMPC_default)
22282230
CHECK_SIMPLE_CLAUSE(Depobj, OMPC_depobj)
22292231
CHECK_SIMPLE_CLAUSE(Destroy, OMPC_destroy)
@@ -2236,6 +2238,7 @@ CHECK_SIMPLE_CLAUSE(Flush, OMPC_flush)
22362238
CHECK_SIMPLE_CLAUSE(From, OMPC_from)
22372239
CHECK_SIMPLE_CLAUSE(Full, OMPC_full)
22382240
CHECK_SIMPLE_CLAUSE(Hint, OMPC_hint)
2241+
CHECK_SIMPLE_CLAUSE(Holds, OMPC_holds)
22392242
CHECK_SIMPLE_CLAUSE(InReduction, OMPC_in_reduction)
22402243
CHECK_SIMPLE_CLAUSE(Inclusive, OMPC_inclusive)
22412244
CHECK_SIMPLE_CLAUSE(Match, OMPC_match)
@@ -2248,6 +2251,9 @@ CHECK_SIMPLE_CLAUSE(Inbranch, OMPC_inbranch)
22482251
CHECK_SIMPLE_CLAUSE(Link, OMPC_link)
22492252
CHECK_SIMPLE_CLAUSE(Indirect, OMPC_indirect)
22502253
CHECK_SIMPLE_CLAUSE(Mergeable, OMPC_mergeable)
2254+
CHECK_SIMPLE_CLAUSE(NoOpenmp, OMPC_no_openmp)
2255+
CHECK_SIMPLE_CLAUSE(NoOpenmpRoutines, OMPC_no_openmp_routines)
2256+
CHECK_SIMPLE_CLAUSE(NoParallelism, OMPC_no_parallelism)
22512257
CHECK_SIMPLE_CLAUSE(Nogroup, OMPC_nogroup)
22522258
CHECK_SIMPLE_CLAUSE(Notinbranch, OMPC_notinbranch)
22532259
CHECK_SIMPLE_CLAUSE(Partial, OMPC_partial)

0 commit comments

Comments
 (0)