[flang] [llvm] [flang][OpenMP] Parsing support for iterator in DEPEND clause (PR #113622)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 04:59:02 PDT 2024
================
@@ -795,35 +795,41 @@ bool ClauseProcessor::processCopyprivate(
bool ClauseProcessor::processDepend(mlir::omp::DependClauseOps &result) const {
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
- return findRepeatableClause<omp::clause::Depend>(
- [&](const omp::clause::Depend &clause, const parser::CharBlock &) {
- using Depend = omp::clause::Depend;
- assert(std::holds_alternative<Depend::DepType>(clause.u) &&
- "Only the form with depenence type is handled at the moment");
- auto &depType = std::get<Depend::DepType>(clause.u);
- auto kind = std::get<Depend::TaskDependenceType>(depType.t);
- auto &objects = std::get<omp::ObjectList>(depType.t);
-
- mlir::omp::ClauseTaskDependAttr dependTypeOperand =
- genDependKindAttr(firOpBuilder, kind);
- result.dependKinds.append(objects.size(), dependTypeOperand);
-
- for (const omp::Object &object : objects) {
- assert(object.ref() && "Expecting designator");
-
- if (evaluate::ExtractSubstring(*object.ref())) {
- TODO(converter.getCurrentLocation(),
- "substring not supported for task depend");
- } else if (evaluate::IsArrayElement(*object.ref())) {
- TODO(converter.getCurrentLocation(),
- "array sections not supported for task depend");
- }
+ auto process = [&](const omp::clause::Depend &clause,
+ const parser::CharBlock &) {
+ using Depend = omp::clause::Depend;
+ assert(std::holds_alternative<Depend::DepType>(clause.u) &&
+ "Only the form with depenence type is handled at the moment");
----------------
kparzysz wrote:
Done.
https://github.com/llvm/llvm-project/pull/113622
More information about the llvm-commits
mailing list