[flang-commits] [llvm] [flang] [OpenMP][Draft] Breaking up of combined/composite directives (PR #80059)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Thu Feb 1 05:22:26 PST 2024
================
@@ -48,27 +49,76 @@ using DeclareTargetCapturePair =
// Common helper functions
//===----------------------------------------------------------------------===//
-static Fortran::semantics::Symbol *
-getOmpObjectSymbol(const Fortran::parser::OmpObject &ompObject) {
- Fortran::semantics::Symbol *sym = nullptr;
- std::visit(
- Fortran::common::visitors{
- [&](const Fortran::parser::Designator &designator) {
- if (auto *arrayEle =
- Fortran::parser::Unwrap<Fortran::parser::ArrayElement>(
- designator)) {
- sym = GetFirstName(arrayEle->base).symbol;
- } else if (auto *structComp = Fortran::parser::Unwrap<
- Fortran::parser::StructureComponent>(designator)) {
- sym = structComp->component.symbol;
- } else if (const Fortran::parser::Name *name =
- Fortran::semantics::getDesignatorNameIfDataRef(
- designator)) {
- sym = name->symbol;
- }
- },
- [&](const Fortran::parser::Name &name) { sym = name.symbol; }},
- ompObject.u);
+static llvm::ArrayRef<llvm::omp::Directive> getWorksharing() {
----------------
skatrak wrote:
Wouldn't it be possible to use the sets defined in "flang/include/flang/Semantics/openmp-directive-sets.h" for this? If others are needed, I think they could be added there as well.
https://github.com/llvm/llvm-project/pull/80059
More information about the flang-commits
mailing list