[flang] [llvm] [OpenMP][Draft] Breaking up of combined/composite directives (PR #80059)
Sergio Afonso via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 05:22:25 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:
Nit: Since this is part of the flang subproject, I think it's fine to skip C/C++-only directives, like anything including 'for'.
https://github.com/llvm/llvm-project/pull/80059
More information about the llvm-commits
mailing list