Skip to content

Commit

Permalink
[flang][OpenMP] Follow-up to build-breakage fix (#102028)
Browse files Browse the repository at this point in the history
Adjust the handling of a few of the new clauses.
  • Loading branch information
kparzysz authored Aug 21, 2024
1 parent 8b4d4be commit 89c556c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
30 changes: 6 additions & 24 deletions flang/lib/Lower/OpenMP/Clauses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/OpenMP/Clauses.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ using At = tomp::clause::AtT<TypeTy, IdTy, ExprTy>;
using Bind = tomp::clause::BindT<TypeTy, IdTy, ExprTy>;
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>;
Expand Down

0 comments on commit 89c556c

Please sign in to comment.