[flang-commits] [flang] [llvm] [mlir] [Frontend][OpenMP] Implement getLeafOrCompositeConstructs (PR #89104)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Tue Apr 23 07:10:00 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:
I created the concept that this function implements as a common element in implementing other functions. This is a utility function that has a clearly defined functionality, that only depends on what is considered a "composite" construct. It is not an API function and it doesn't have to concern itself with validating the inputs, that's left to the API functions.
There are other ways to implement the breakdown of compound constructs, yours is likely another valid approach, but I've picked this one because of its flexibility.
https://github.com/llvm/llvm-project/pull/89104
More information about the flang-commits
mailing list