Lines Matching +full:auto +full:- +full:range
1 //===- OMP.cpp ------ Collection of helpers for OpenMP --------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
30 // OpenMP Spec 5.2: [17.3, 8-9] in getFirstCompositeRange()
31 // If directive-name-A and directive-name-B both correspond to loop- in getFirstCompositeRange()
32 // associated constructs then directive-name is a composite construct in getFirstCompositeRange()
33 // otherwise directive-name is a combined construct. in getFirstCompositeRange()
35 // In the list of leaf constructs, find the first loop-associated construct, in getFirstCompositeRange()
36 // this is the beginning of the returned range. Then, starting from the in getFirstCompositeRange()
38 // loop-associated constructs. The last of those is the last one of the in getFirstCompositeRange()
39 // range, that is, the end of the range is one past that element. in getFirstCompositeRange()
40 // If such a sequence of adjacent loop-associated directives does not exist, in getFirstCompositeRange()
41 // return an empty range. in getFirstCompositeRange()
43 // The end of the returned range (including empty range) is intended to be in getFirstCompositeRange()
44 // a point from which the search for the next range could resume. in getFirstCompositeRange()
46 // Consequently, this function can't return a range with a single leaf in getFirstCompositeRange()
49 auto firstLoopAssociated = in getFirstCompositeRange()
51 for (auto It = List.begin(), End = List.end(); It != End; ++It) { in getFirstCompositeRange()
58 auto Empty = llvm::make_range(Leafs.end(), Leafs.end()); in getFirstCompositeRange()
60 auto Begin = firstLoopAssociated(Leafs); in getFirstCompositeRange()
64 auto End = in getFirstCompositeRange()
78 auto Idx = static_cast<std::size_t>(D); in getLeafConstructs()
81 const auto *Row = LeafConstructTable[LeafConstructTableOrdering[Idx]]; in getLeafConstructs()
86 if (auto Leafs = getLeafConstructs(D); !Leafs.empty()) in getLeafConstructsOrSelf()
88 auto Idx = static_cast<size_t>(D); in getLeafConstructsOrSelf()
90 const auto *Row = LeafConstructTable[LeafConstructTableOrdering[Idx]]; in getLeafConstructsOrSelf()
103 auto Range = getFirstCompositeRange(llvm::make_range(Iter, Leafs.end())); in getLeafOrCompositeConstructs() local
104 // All directives before the range are leaf constructs. in getLeafOrCompositeConstructs()
105 for (; Iter != Range.begin(); ++Iter) in getLeafOrCompositeConstructs()
107 if (!Range.empty()) { in getLeafOrCompositeConstructs()
109 getCompoundConstruct(ArrayTy(Range.begin(), Range.end())); in getLeafOrCompositeConstructs()
112 Iter = Range.end(); in getLeafOrCompositeConstructs()
145 auto GivenLeafs{ArrayRef<Directive>(RawLeafs).drop_front(2)}; in getCompoundConstruct()
150 auto Iter = std::lower_bound( in getCompoundConstruct()
154 const auto *BeginA = &RowA[2]; in getCompoundConstruct()
155 const auto *EndA = BeginA + static_cast<int>(RowA[1]); in getCompoundConstruct()
156 const auto *BeginB = &RowB[2]; in getCompoundConstruct()
157 const auto *EndB = BeginB + static_cast<int>(RowB[1]); in getCompoundConstruct()
180 auto Range = getFirstCompositeRange(Leafs); in isCompositeConstruct() local
181 return Range.begin() == Leafs.begin() && Range.end() == Leafs.end(); in isCompositeConstruct()
185 // OpenMP Spec 5.2: [17.3, 9-10] in isCombinedConstruct()
186 // Otherwise directive-name is a combined construct. in isCombinedConstruct()