================ @@ -710,6 +710,81 @@ genOpenMPReduction(Fortran::lower::AbstractConverter &converter, } } +/// Split a combined directive into an outer leaf directive and the (possibly +/// combined) rest of the combined directive. Composite directives and +/// non-compound directives are not split, in which case it will return the +/// input directive as its first output and an empty value as its second output. +static std::pair<llvm::omp::Directive, std::optional<llvm::omp::Directive>> ---------------- skatrak wrote:
> We have llvm::omp::getLeafConstructs that breaks up any combined/composite > directive into leafs. That might be useful here, though if it splits up composite constructs too maybe it wouldn't be as straightforward to use in this case. Does it provide a relatively clean way to split something like `teams distribute simd` into `[teams, distribute simd]` rather than `[teams, distribute, simd]`? https://github.com/llvm/llvm-project/pull/87070 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits