[llvm-branch-commits] [llvm] [LLVM][OpenMP] Implement getLeafOrCompositeConstructs (PR #89104)
Krzysztof Parzyszek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 22 06:53:04 PDT 2024
================
@@ -25,6 +25,43 @@ using namespace llvm::omp;
#define GEN_DIRECTIVES_IMPL
#include "llvm/Frontend/OpenMP/OMP.inc"
+static iterator_range<ArrayRef<Directive>::iterator>
+getFirstCompositeRange(iterator_range<ArrayRef<Directive>::iterator> Leafs) {
----------------
kparzysz wrote:
This is intended to be a general utility to find the first sequence of leaf constructs that together constitute a composite construct. The input leafs aren't assumed to represent a legal construct.
It's also used in `isCompositeConstruct` as well, where I break up the given directive into leafs and check if the "first composite range" is equal to the sequence of leafs.
https://github.com/llvm/llvm-project/pull/89104
More information about the llvm-branch-commits
mailing list