16 #ifndef LLVM_CLANG_AST_OPENMPCLAUSE_H
17 #define LLVM_CLANG_AST_OPENMPCLAUSE_H
42 : StartLoc(StartLoc), EndLoc(EndLoc),
Kind(K) {}
83 assert(
get(This) &&
"get is not tuned for pre-init.");
106 assert(
get(This) &&
"get is not tuned for post-update.");
132 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>(), NumVars);
137 assert(VL.size() == NumVars &&
138 "Number of variables is not the same as the preallocated buffer");
139 std::copy(VL.begin(), VL.end(),
140 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>());
153 :
OMPClause(K, StartLoc, EndLoc), LParenLoc(LParenLoc), NumVars(N) {}
183 return llvm::makeArrayRef(
184 static_cast<const T *>(
this)->
template getTrailingObjects<Expr *>(),
212 void setCondition(
Expr *Cond) { Condition = Cond; }
218 void setNameModifierLoc(SourceLocation Loc) { NameModifierLoc = Loc; }
238 :
OMPClause(OMPC_if, StartLoc, EndLoc), LParenLoc(LParenLoc),
239 Condition(Cond), ColonLoc(ColonLoc), NameModifier(NameModifier),
240 NameModifierLoc(NameModifierLoc) {}
283 SourceLocation LParenLoc;
289 void setCondition(Expr *Cond) { Condition = Cond; }
301 :
OMPClause(OMPC_final, StartLoc, EndLoc), LParenLoc(LParenLoc),
343 void setNumThreads(
Expr *NThreads) { NumThreads = NThreads; }
355 :
OMPClause(OMPC_num_threads, StartLoc, EndLoc), LParenLoc(LParenLoc),
356 NumThreads(NumThreads) {}
400 void setSafelen(
Expr *Len) { Safelen = Len; }
411 :
OMPClause(OMPC_safelen, StartLoc, EndLoc), LParenLoc(LParenLoc),
455 void setSimdlen(
Expr *Len) { Simdlen = Len; }
466 :
OMPClause(OMPC_simdlen, StartLoc, EndLoc), LParenLoc(LParenLoc),
510 void setNumForLoops(
Expr *Num) { NumForLoops = Num; }
522 :
OMPClause(OMPC_collapse, StartLoc, EndLoc), LParenLoc(LParenLoc),
573 void setDefaultKindKwLoc(
SourceLocation KLoc) { KindKwLoc = KLoc; }
587 :
OMPClause(OMPC_default, StartLoc, EndLoc), LParenLoc(LParenLoc),
588 Kind(A), KindKwLoc(ALoc) {}
645 void setProcBindKindKwLoc(
SourceLocation KLoc) { KindKwLoc = KLoc; }
660 :
OMPClause(OMPC_proc_bind, StartLoc, EndLoc), LParenLoc(LParenLoc),
661 Kind(A), KindKwLoc(ALoc) {}
705 enum {FIRST, SECOND, NUM_MODIFIERS};
726 Modifiers[FIRST] = M;
733 Modifiers[SECOND] = M;
737 void setFirstScheduleModifierLoc(SourceLocation Loc) {
738 ModifiersLoc[FIRST] = Loc;
742 void setSecondScheduleModifierLoc(SourceLocation Loc) {
743 ModifiersLoc[SECOND] = Loc;
751 Modifiers[FIRST] = M;
754 Modifiers[SECOND] = M;
761 void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
766 void setScheduleKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
771 void setCommaLoc(SourceLocation Loc) { CommaLoc = Loc; }
776 void setChunkSize(Expr *
E) { ChunkSize =
E; }
798 Expr *ChunkSize,
Stmt *HelperChunkSize,
802 LParenLoc(LParenLoc), Kind(Kind), KindLoc(KLoc), CommaLoc(CommaLoc),
803 ChunkSize(ChunkSize) {
805 Modifiers[FIRST] = M1;
806 Modifiers[SECOND] = M2;
807 ModifiersLoc[FIRST] = M1Loc;
808 ModifiersLoc[SECOND] = M2Loc;
827 return Modifiers[FIRST];
832 return Modifiers[SECOND];
843 return ModifiersLoc[FIRST];
848 return ModifiersLoc[SECOND];
865 return child_range(reinterpret_cast<Stmt **>(&ChunkSize),
866 reinterpret_cast<Stmt **>(&ChunkSize) + 1);
886 void setNumForLoops(
Expr *Num) { NumForLoops = Num; }
898 :
OMPClause(OMPC_ordered, StartLoc, EndLoc), LParenLoc(LParenLoc),
937 :
OMPClause(OMPC_nowait, StartLoc, EndLoc) {}
968 :
OMPClause(OMPC_untied, StartLoc, EndLoc) {}
1000 :
OMPClause(OMPC_mergeable, StartLoc, EndLoc) {}
1031 :
OMPClause(OMPC_read, StartLoc, EndLoc) {}
1061 :
OMPClause(OMPC_write, StartLoc, EndLoc) {}
1093 :
OMPClause(OMPC_update, StartLoc, EndLoc) {}
1125 :
OMPClause(OMPC_capture, StartLoc, EndLoc) {}
1157 :
OMPClause(OMPC_seq_cst, StartLoc, EndLoc) {}
1184 friend TrailingObjects;
1211 void setPrivateCopies(ArrayRef<Expr *> VL);
1215 MutableArrayRef<Expr *> getPrivateCopies() {
1218 ArrayRef<const Expr *> getPrivateCopies()
const {
1233 SourceLocation LParenLoc,
1234 SourceLocation EndLoc, ArrayRef<Expr *> VL,
1235 ArrayRef<Expr *> PrivateVL);
1246 typedef llvm::iterator_range<private_copies_const_iterator>
1251 getPrivateCopies().
end());
1255 getPrivateCopies().
end());
1281 friend TrailingObjects;
1295 LParenLoc, EndLoc, N),
1310 void setPrivateCopies(ArrayRef<Expr *> VL);
1314 MutableArrayRef<Expr *> getPrivateCopies() {
1317 ArrayRef<const Expr *> getPrivateCopies()
const {
1324 void setInits(ArrayRef<Expr *> VL);
1328 MutableArrayRef<Expr *>
getInits() {
1329 return MutableArrayRef<Expr *>(getPrivateCopies().end(),
varlist_size());
1331 ArrayRef<const Expr *>
getInits()
const {
1350 static OMPFirstprivateClause *
1352 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> PrivateVL,
1353 ArrayRef<Expr *> InitVL,
Stmt *PreInit);
1364 typedef llvm::iterator_range<private_copies_const_iterator>
1369 getPrivateCopies().
end());
1373 getPrivateCopies().
end());
1427 friend TrailingObjects;
1441 LParenLoc, EndLoc, N),
1456 MutableArrayRef<Expr *> getPrivateCopies() {
1459 ArrayRef<const Expr *> getPrivateCopies()
const {
1467 void setSourceExprs(ArrayRef<Expr *> SrcExprs);
1470 MutableArrayRef<Expr *> getSourceExprs() {
1471 return MutableArrayRef<Expr *>(getPrivateCopies().end(),
varlist_size());
1473 ArrayRef<const Expr *> getSourceExprs()
const {
1481 void setDestinationExprs(ArrayRef<Expr *> DstExprs);
1484 MutableArrayRef<Expr *> getDestinationExprs() {
1485 return MutableArrayRef<Expr *>(getSourceExprs().end(),
varlist_size());
1487 ArrayRef<const Expr *> getDestinationExprs()
const {
1494 void setAssignmentOps(ArrayRef<Expr *> AssignmentOps);
1497 MutableArrayRef<Expr *> getAssignmentOps() {
1498 return MutableArrayRef<Expr *>(getDestinationExprs().end(),
varlist_size());
1500 ArrayRef<const Expr *> getAssignmentOps()
const {
1501 return llvm::makeArrayRef(getDestinationExprs().
end(),
varlist_size());
1530 static OMPLastprivateClause *
1532 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
1533 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps,
1534 Stmt *PreInit, Expr *PostUpdate);
1545 typedef llvm::iterator_range<helper_expr_const_iterator>
1554 getPrivateCopies().
end());
1558 getPrivateCopies().
end());
1562 getSourceExprs().
end());
1569 getDestinationExprs().
end());
1573 getDestinationExprs().
end());
1577 getAssignmentOps().
end());
1581 getAssignmentOps().
end());
1605 friend TrailingObjects;
1670 friend TrailingObjects;
1695 LParenLoc, EndLoc, N),
1697 QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
1712 void setNameInfo(DeclarationNameInfo DNI) { NameInfo = DNI; }
1714 void setQualifierLoc(NestedNameSpecifierLoc NSL) { QualifierLoc = NSL; }
1732 void setLHSExprs(ArrayRef<Expr *> LHSExprs);
1735 MutableArrayRef<Expr *> getLHSExprs() {
1738 ArrayRef<const Expr *> getLHSExprs()
const {
1747 void setRHSExprs(ArrayRef<Expr *> RHSExprs);
1750 MutableArrayRef<Expr *> getRHSExprs() {
1751 return MutableArrayRef<Expr *>(getLHSExprs().end(),
varlist_size());
1753 ArrayRef<const Expr *> getRHSExprs()
const {
1761 void setReductionOps(ArrayRef<Expr *> ReductionOps);
1764 MutableArrayRef<Expr *> getReductionOps() {
1765 return MutableArrayRef<Expr *>(getRHSExprs().end(),
varlist_size());
1767 ArrayRef<const Expr *> getReductionOps()
const {
1805 static OMPReductionClause *
1807 SourceLocation
ColonLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL,
1808 NestedNameSpecifierLoc QualifierLoc,
1809 const DeclarationNameInfo &NameInfo, ArrayRef<Expr *>
Privates,
1810 ArrayRef<Expr *> LHSExprs, ArrayRef<Expr *> RHSExprs,
1811 ArrayRef<Expr *> ReductionOps,
Stmt *PreInit, Expr *PostUpdate);
1829 typedef llvm::iterator_range<helper_expr_const_iterator>
1852 getReductionOps().
end());
1856 getReductionOps().
end());
1882 friend TrailingObjects;
1908 SourceLocation
ColonLoc, SourceLocation EndLoc,
1913 ModifierLoc(ModifierLoc), ColonLoc(ColonLoc) {}
1921 SourceLocation(), SourceLocation(),
1949 ArrayRef<const Expr *>
getInits()
const {
1965 ArrayRef<const Expr *>
getFinals()
const {
1975 void setInits(ArrayRef<Expr *> IL);
2000 SourceLocation
ColonLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL,
2001 ArrayRef<Expr *> PL, ArrayRef<Expr *> IL, Expr *Step, Expr *CalcStep,
2002 Stmt *PreInit, Expr *PostUpdate);
2120 void setAlignment(Expr *A) { *varlist_end() = A; }
2131 SourceLocation
ColonLoc, SourceLocation EndLoc,
2135 ColonLoc(ColonLoc) {}
2143 SourceLocation(), SourceLocation(),
2158 SourceLocation LParenLoc,
2160 SourceLocation EndLoc, ArrayRef<Expr *> VL,
2181 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2182 reinterpret_cast<Stmt **>(varlist_end()));
2186 return T->getClauseKind() == OMPC_aligned;
2225 SourceLocation EndLoc,
unsigned N)
2235 SourceLocation(), SourceLocation(),
2241 void setSourceExprs(ArrayRef<Expr *> SrcExprs);
2244 MutableArrayRef<Expr *> getSourceExprs() {
2245 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
2247 ArrayRef<const Expr *> getSourceExprs()
const {
2248 return llvm::makeArrayRef(varlist_end(), varlist_size());
2254 void setDestinationExprs(ArrayRef<Expr *> DstExprs);
2257 MutableArrayRef<Expr *> getDestinationExprs() {
2258 return MutableArrayRef<Expr *>(getSourceExprs().end(), varlist_size());
2260 ArrayRef<const Expr *> getDestinationExprs()
const {
2261 return llvm::makeArrayRef(getSourceExprs().
end(), varlist_size());
2268 void setAssignmentOps(ArrayRef<Expr *> AssignmentOps);
2271 MutableArrayRef<Expr *> getAssignmentOps() {
2272 return MutableArrayRef<Expr *>(getDestinationExprs().end(), varlist_size());
2274 ArrayRef<const Expr *> getAssignmentOps()
const {
2275 return llvm::makeArrayRef(getDestinationExprs().
end(), varlist_size());
2303 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
2304 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
2315 typedef llvm::iterator_range<helper_expr_const_iterator>
2320 getSourceExprs().
end());
2327 getDestinationExprs().
end());
2331 getDestinationExprs().
end());
2335 getAssignmentOps().
end());
2339 getAssignmentOps().
end());
2343 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2344 reinterpret_cast<Stmt **>(varlist_end()));
2348 return T->getClauseKind() == OMPC_copyin;
2375 SourceLocation EndLoc,
unsigned N)
2377 LParenLoc, EndLoc, N) {}
2385 OMPC_copyprivate, SourceLocation(), SourceLocation(),
2386 SourceLocation(), N) {}
2391 void setSourceExprs(ArrayRef<Expr *> SrcExprs);
2394 MutableArrayRef<Expr *> getSourceExprs() {
2395 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
2397 ArrayRef<const Expr *> getSourceExprs()
const {
2398 return llvm::makeArrayRef(varlist_end(), varlist_size());
2404 void setDestinationExprs(ArrayRef<Expr *> DstExprs);
2407 MutableArrayRef<Expr *> getDestinationExprs() {
2408 return MutableArrayRef<Expr *>(getSourceExprs().end(), varlist_size());
2410 ArrayRef<const Expr *> getDestinationExprs()
const {
2411 return llvm::makeArrayRef(getSourceExprs().
end(), varlist_size());
2418 void setAssignmentOps(ArrayRef<Expr *> AssignmentOps);
2421 MutableArrayRef<Expr *> getAssignmentOps() {
2422 return MutableArrayRef<Expr *>(getDestinationExprs().end(), varlist_size());
2424 ArrayRef<const Expr *> getAssignmentOps()
const {
2425 return llvm::makeArrayRef(getDestinationExprs().
end(), varlist_size());
2452 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
2453 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
2464 typedef llvm::iterator_range<helper_expr_const_iterator>
2469 getSourceExprs().
end());
2476 getDestinationExprs().
end());
2480 getDestinationExprs().
end());
2484 getAssignmentOps().
end());
2488 getAssignmentOps().
end());
2492 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2493 reinterpret_cast<Stmt **>(varlist_end()));
2497 return T->getClauseKind() == OMPC_copyprivate;
2526 OMPFlushClause(SourceLocation StartLoc, SourceLocation LParenLoc,
2527 SourceLocation EndLoc,
unsigned N)
2528 : OMPVarListClause<OMPFlushClause>(OMPC_flush, StartLoc, LParenLoc,
2536 : OMPVarListClause<OMPFlushClause>(OMPC_flush, SourceLocation(),
2537 SourceLocation(), SourceLocation(),
2550 SourceLocation LParenLoc, SourceLocation EndLoc,
2551 ArrayRef<Expr *> VL);
2560 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2561 reinterpret_cast<Stmt **>(varlist_end()));
2565 return T->getClauseKind() == OMPC_flush;
2587 SourceLocation DepLoc;
2598 SourceLocation EndLoc,
unsigned N)
2609 SourceLocation(), SourceLocation(),
2616 void setDependencyLoc(SourceLocation Loc) { DepLoc = Loc; }
2635 SourceLocation DepLoc, SourceLocation
ColonLoc, ArrayRef<Expr *> VL);
2652 void setCounterValue(Expr *V);
2654 Expr *getCounterValue();
2656 const Expr *getCounterValue()
const;
2659 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2660 reinterpret_cast<Stmt **>(varlist_end()));
2664 return T->getClauseKind() == OMPC_depend;
2680 SourceLocation LParenLoc;
2687 void setDevice(Expr *
E) { Device =
E; }
2698 SourceLocation EndLoc)
2699 :
OMPClause(OMPC_device, StartLoc, EndLoc), LParenLoc(LParenLoc),
2705 :
OMPClause(OMPC_device, SourceLocation(), SourceLocation()),
2706 LParenLoc(SourceLocation()), Device(nullptr) {}
2717 return T->getClauseKind() == OMPC_device;
2720 child_range
children() {
return child_range(&Device, &Device + 1); }
2738 :
OMPClause(OMPC_threads, StartLoc, EndLoc) {}
2743 :
OMPClause(OMPC_threads, SourceLocation(), SourceLocation()) {}
2746 return T->getClauseKind() == OMPC_threads;
2750 return child_range(child_iterator(), child_iterator());
2769 :
OMPClause(OMPC_simd, StartLoc, EndLoc) {}
2776 return T->getClauseKind() == OMPC_simd;
2780 return child_range(child_iterator(), child_iterator());
2796 Expr *AssociatedExpression =
nullptr;
2800 ValueDecl *AssociatedDeclaration =
nullptr;
2805 ValueDecl *AssociatedDeclaration)
2806 : AssociatedExpression(AssociatedExpression),
2807 AssociatedDeclaration(
2808 AssociatedDeclaration
2814 return AssociatedDeclaration;
2837 getUniqueDeclarationsTotalNumber(ArrayRef<ValueDecl *> Declarations);
2850 unsigned NumUniqueDeclarations;
2853 unsigned NumComponentLists;
2856 unsigned NumComponents;
2862 return MutableArrayRef<ValueDecl *>(
2863 static_cast<T *
>(
this)->
template getTrailingObjects<ValueDecl *>(),
2864 NumUniqueDeclarations);
2870 return ArrayRef<ValueDecl *>(
2871 static_cast<const T *
>(
this)
2872 ->
template getTrailingObjects<ValueDecl *>(),
2873 NumUniqueDeclarations);
2879 assert(UDs.size() == NumUniqueDeclarations &&
2880 "Unexpected amount of unique declarations.");
2881 std::copy(UDs.begin(), UDs.end(), getUniqueDeclsRef().begin());
2887 return MutableArrayRef<unsigned>(
2888 static_cast<T *
>(
this)->
template getTrailingObjects<unsigned>(),
2889 NumUniqueDeclarations);
2895 return ArrayRef<unsigned>(
2896 static_cast<const T *
>(
this)->
template getTrailingObjects<unsigned>(),
2897 NumUniqueDeclarations);
2903 assert(DNLs.size() == NumUniqueDeclarations &&
2904 "Unexpected amount of list numbers.");
2905 std::copy(DNLs.begin(), DNLs.end(), getDeclNumListsRef().begin());
2911 return MutableArrayRef<unsigned>(
2912 static_cast<T *
>(
this)->
template getTrailingObjects<unsigned>() +
2913 NumUniqueDeclarations,
2920 return ArrayRef<unsigned>(
2921 static_cast<const T *
>(
this)->
template getTrailingObjects<unsigned>() +
2922 NumUniqueDeclarations,
2929 assert(CLSs.size() == NumComponentLists &&
2930 "Unexpected amount of component lists.");
2931 std::copy(CLSs.begin(), CLSs.end(), getComponentListSizesRef().begin());
2936 return MutableArrayRef<MappableComponent>(
2937 static_cast<T *
>(
this)
2938 ->
template getTrailingObjects<MappableComponent>(),
2944 return ArrayRef<MappableComponent>(
2945 static_cast<const T *
>(
this)
2946 ->
template getTrailingObjects<MappableComponent>(),
2954 ArrayRef<unsigned> CLSs) {
2955 assert(Components.size() == NumComponents &&
2956 "Unexpected amount of component lists.");
2957 assert(CLSs.size() == NumComponentLists &&
2958 "Unexpected amount of list sizes.");
2959 std::copy(Components.begin(), Components.end(), getComponentsRef().begin());
2968 assert(getUniqueDeclarationsTotalNumber(Declarations) ==
2969 NumUniqueDeclarations &&
2970 "Unexpected number of mappable expression info entries!");
2971 assert(getComponentsTotalNumber(ComponentLists) == NumComponents &&
2972 "Unexpected total number of components!");
2973 assert(Declarations.size() == ComponentLists.size() &&
2974 "Declaration and component lists size is not consistent!");
2975 assert(Declarations.size() == NumComponentLists &&
2976 "Unexpected declaration and component lists size!");
2981 llvm::DenseMap<ValueDecl *, SmallVector<MappableExprComponentListRef, 8>>
2984 auto CI = ComponentLists.begin();
2985 for (
auto DI = Declarations.begin(), DE = Declarations.end(); DI != DE;
2987 assert(!CI->empty() &&
"Invalid component list!");
2988 ComponentListMap[*DI].push_back(*CI);
2993 auto UniqueDeclarations = getUniqueDeclsRef();
2994 auto UDI = UniqueDeclarations.begin();
2996 auto DeclNumLists = getDeclNumListsRef();
2997 auto DNLI = DeclNumLists.begin();
2999 auto ComponentListSizes = getComponentListSizesRef();
3000 auto CLSI = ComponentListSizes.begin();
3002 auto Components = getComponentsRef();
3003 auto CI = Components.begin();
3006 unsigned PrevSize = 0u;
3009 for (
auto &M : ComponentListMap) {
3026 PrevSize +=
C.size();
3033 CI = std::copy(
C.begin(),
C.end(), CI);
3054 SourceLocation LParenLoc, SourceLocation EndLoc,
3055 unsigned NumVars,
unsigned NumUniqueDeclarations,
3056 unsigned NumComponentLists,
unsigned NumComponents)
3058 NumUniqueDeclarations(NumUniqueDeclarations),
3059 NumComponentLists(NumComponentLists), NumComponents(NumComponents) {}
3073 :
public llvm::iterator_adaptor_base<
3074 const_component_lists_iterator,
3075 MappableExprComponentListRef::const_iterator,
3076 std::forward_iterator_tag, MappableComponent, ptrdiff_t,
3077 MappableComponent, MappableComponent> {
3085 unsigned RemainingLists;
3089 unsigned PrevListSize;
3093 ArrayRef<unsigned>::const_iterator ListSizeCur;
3094 ArrayRef<unsigned>::const_iterator ListSizeEnd;
3097 MappableExprComponentListRef::const_iterator
End;
3102 ArrayRef<ValueDecl *> UniqueDecls, ArrayRef<unsigned> DeclsListNum,
3103 ArrayRef<unsigned> CumulativeListSizes,
3106 Components.
begin()),
3107 DeclCur(UniqueDecls.
begin()), NumListsCur(DeclsListNum.
begin()),
3108 RemainingLists(0u), PrevListSize(0u),
3109 ListSizeCur(CumulativeListSizes.
begin()),
3110 ListSizeEnd(CumulativeListSizes.
end()),
End(Components.
end()) {
3111 assert(UniqueDecls.size() == DeclsListNum.size() &&
3112 "Inconsistent number of declarations and list sizes!");
3113 if (!DeclsListNum.empty())
3114 RemainingLists = *NumListsCur;
3120 const ValueDecl *Declaration, ArrayRef<ValueDecl *> UniqueDecls,
3121 ArrayRef<unsigned> DeclsListNum, ArrayRef<unsigned> CumulativeListSizes,
3124 CumulativeListSizes, Components) {
3129 for (; DeclCur != UniqueDecls.end(); ++DeclCur, ++NumListsCur) {
3130 if (*DeclCur == Declaration)
3133 assert(*NumListsCur > 0 &&
"No lists associated with declaration??");
3137 std::advance(ListSizeCur, *NumListsCur - 1);
3138 PrevListSize = *ListSizeCur;
3144 if (ListSizeCur == CumulativeListSizes.end()) {
3146 RemainingLists = 0u;
3152 RemainingLists = *NumListsCur;
3155 ListSizeEnd = ListSizeCur;
3156 std::advance(ListSizeEnd, RemainingLists);
3160 std::advance(this->
I, PrevListSize);
3165 std::pair<const ValueDecl *, MappableExprComponentListRef>
3167 assert(ListSizeCur != ListSizeEnd &&
"Invalid iterator!");
3168 return std::make_pair(
3172 std::pair<const ValueDecl *, MappableExprComponentListRef>
3179 assert(ListSizeCur != ListSizeEnd && RemainingLists &&
3180 "Invalid iterator!");
3184 if (std::next(ListSizeCur) == ListSizeEnd) {
3188 std::advance(this->
I, *ListSizeCur - PrevListSize);
3189 PrevListSize = *ListSizeCur;
3192 if (!(--RemainingLists)) {
3195 RemainingLists = *NumListsCur;
3196 assert(RemainingLists &&
"No lists in the following declaration??");
3205 typedef llvm::iterator_range<const_component_lists_iterator>
3210 return const_component_lists_iterator(
3211 getUniqueDeclsRef(), getDeclNumListsRef(), getComponentListSizesRef(),
3212 getComponentsRef());
3215 return const_component_lists_iterator(
3216 ArrayRef<ValueDecl *>(), ArrayRef<unsigned>(), ArrayRef<unsigned>(),
3218 getComponentsRef().
end()));
3221 return {component_lists_begin(), component_lists_end()};
3226 const_component_lists_iterator
3228 return const_component_lists_iterator(
3229 VD, getUniqueDeclsRef(), getDeclNumListsRef(),
3230 getComponentListSizesRef(), getComponentsRef());
3233 return component_lists_end();
3236 return {decl_component_lists_begin(VD), decl_component_lists_end()};
3244 auto A = getUniqueDeclsRef();
3249 typedef llvm::iterator_range<const_all_num_lists_iterator>
3252 auto A = getDeclNumListsRef();
3257 typedef llvm::iterator_range<const_all_lists_sizes_iterator>
3260 auto A = getComponentListSizesRef();
3265 typedef llvm::iterator_range<const_all_components_iterator>
3268 auto A = getComponentsRef();
3284 OMPMapClause, Expr *, ValueDecl *, unsigned,
3285 OMPClauseMappableExprCommon::MappableComponent> {
3293 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
3294 return varlist_size();
3296 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
3297 return getUniqueDeclarationsNum();
3299 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
3300 return getUniqueDeclarationsNum() + getTotalComponentListNum();
3308 bool MapTypeIsImplicit;
3310 SourceLocation MapLoc;
3330 void setMapLoc(SourceLocation TLoc) { MapLoc = TLoc; }
3353 SourceLocation MapLoc, SourceLocation StartLoc,
3354 SourceLocation LParenLoc, SourceLocation EndLoc,
3355 unsigned NumVars,
unsigned NumUniqueDeclarations,
3356 unsigned NumComponentLists,
unsigned NumComponents)
3358 NumVars, NumUniqueDeclarations,
3359 NumComponentLists, NumComponents),
3360 MapTypeModifier(MapTypeModifier), MapType(MapType),
3361 MapTypeIsImplicit(MapTypeIsImplicit), MapLoc(MapLoc) {}
3371 explicit OMPMapClause(
unsigned NumVars,
unsigned NumUniqueDeclarations,
3372 unsigned NumComponentLists,
unsigned NumComponents)
3374 OMPC_map, SourceLocation(), SourceLocation(), SourceLocation(),
3375 NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents),
3377 MapTypeIsImplicit(
false), MapLoc() {}
3394 SourceLocation LParenLoc, SourceLocation EndLoc,
3395 ArrayRef<Expr *> Vars,
3396 ArrayRef<ValueDecl *> Declarations,
3397 MappableExprComponentListsRef ComponentLists,
3400 SourceLocation TypeLoc);
3414 unsigned NumUniqueDeclarations,
3415 unsigned NumComponentLists,
3416 unsigned NumComponents);
3430 return MapTypeModifier;
3434 SourceLocation
getMapLoc() const LLVM_READONLY {
return MapLoc; }
3440 return T->getClauseKind() == OMPC_map;
3445 reinterpret_cast<Stmt **>(varlist_begin()),
3446 reinterpret_cast<Stmt **>(varlist_end()));
3462 SourceLocation LParenLoc;
3469 void setNumTeams(Expr *
E) { NumTeams =
E; }
3480 SourceLocation EndLoc)
3481 :
OMPClause(OMPC_num_teams, StartLoc, EndLoc), LParenLoc(LParenLoc),
3487 :
OMPClause(OMPC_num_teams, SourceLocation(), SourceLocation()),
3488 LParenLoc(SourceLocation()), NumTeams(nullptr) {}
3499 return T->getClauseKind() == OMPC_num_teams;
3502 child_range
children() {
return child_range(&NumTeams, &NumTeams + 1); }
3517 SourceLocation LParenLoc;
3524 void setThreadLimit(Expr *
E) { ThreadLimit =
E; }
3535 SourceLocation LParenLoc, SourceLocation EndLoc)
3536 :
OMPClause(OMPC_thread_limit, StartLoc, EndLoc), LParenLoc(LParenLoc),
3542 :
OMPClause(OMPC_thread_limit, SourceLocation(), SourceLocation()),
3543 LParenLoc(SourceLocation()), ThreadLimit(nullptr) {}
3554 return T->getClauseKind() == OMPC_thread_limit;
3557 child_range
children() {
return child_range(&ThreadLimit, &ThreadLimit + 1); }
3572 SourceLocation LParenLoc;
3579 void setPriority(Expr *
E) { Priority =
E; }
3590 SourceLocation EndLoc)
3591 :
OMPClause(OMPC_priority, StartLoc, EndLoc), LParenLoc(LParenLoc),
3597 :
OMPClause(OMPC_priority, SourceLocation(), SourceLocation()),
3598 LParenLoc(SourceLocation()), Priority(nullptr) {}
3609 return T->getClauseKind() == OMPC_priority;
3612 child_range
children() {
return child_range(&Priority, &Priority + 1); }
3627 SourceLocation LParenLoc;
3632 void setGrainsize(Expr *Size) { Grainsize = Size; }
3642 SourceLocation LParenLoc, SourceLocation EndLoc)
3643 :
OMPClause(OMPC_grainsize, StartLoc, EndLoc), LParenLoc(LParenLoc),
3649 :
OMPClause(OMPC_grainsize, SourceLocation(), SourceLocation()),
3650 LParenLoc(SourceLocation()), Grainsize(nullptr) {}
3661 return T->getClauseKind() == OMPC_grainsize;
3664 child_range
children() {
return child_range(&Grainsize, &Grainsize + 1); }
3682 :
OMPClause(OMPC_nogroup, StartLoc, EndLoc) {}
3687 :
OMPClause(OMPC_nogroup, SourceLocation(), SourceLocation()) {}
3690 return T->getClauseKind() == OMPC_nogroup;
3694 return child_range(child_iterator(), child_iterator());
3710 SourceLocation LParenLoc;
3715 void setNumTasks(Expr *Size) { NumTasks = Size; }
3725 SourceLocation LParenLoc, SourceLocation EndLoc)
3726 :
OMPClause(OMPC_num_tasks, StartLoc, EndLoc), LParenLoc(LParenLoc),
3732 :
OMPClause(OMPC_num_tasks, SourceLocation(), SourceLocation()),
3733 LParenLoc(SourceLocation()), NumTasks(nullptr) {}
3744 return T->getClauseKind() == OMPC_num_tasks;
3747 child_range
children() {
return child_range(&NumTasks, &NumTasks + 1); }
3761 SourceLocation LParenLoc;
3767 void setHint(Expr *H) { Hint = H; }
3778 SourceLocation EndLoc)
3779 :
OMPClause(OMPC_hint, StartLoc, EndLoc), LParenLoc(LParenLoc),
3785 :
OMPClause(OMPC_hint, SourceLocation(), SourceLocation()),
3786 LParenLoc(SourceLocation()), Hint(nullptr) {}
3794 Expr *
getHint()
const {
return cast_or_null<Expr>(Hint); }
3797 return T->getClauseKind() == OMPC_hint;
3800 child_range
children() {
return child_range(&Hint, &Hint + 1); }
3815 SourceLocation LParenLoc;
3819 SourceLocation KindLoc;
3821 SourceLocation CommaLoc;
3834 void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
3839 void setDistScheduleKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
3844 void setCommaLoc(SourceLocation Loc) { CommaLoc = Loc; }
3849 void setChunkSize(Expr *
E) { ChunkSize =
E; }
3865 SourceLocation KLoc, SourceLocation CommaLoc,
3866 SourceLocation EndLoc,
3868 Stmt *HelperChunkSize)
3869 :
OMPClause(OMPC_dist_schedule, StartLoc, EndLoc),
3871 KindLoc(KLoc), CommaLoc(CommaLoc), ChunkSize(ChunkSize) {
3872 setPreInitStmt(HelperChunkSize);
3878 :
OMPClause(OMPC_dist_schedule, SourceLocation(), SourceLocation()),
3880 ChunkSize(nullptr) {}
3902 return T->getClauseKind() == OMPC_dist_schedule;
3906 return child_range(reinterpret_cast<Stmt **>(&ChunkSize),
3907 reinterpret_cast<Stmt **>(&ChunkSize) + 1);
3922 SourceLocation LParenLoc;
3930 SourceLocation KindLoc;
3946 void setDefaultmapModifierLoc(SourceLocation Loc) {
3953 void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
3958 void setDefaultmapKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
3972 SourceLocation MLoc, SourceLocation KLoc,
3975 :
OMPClause(OMPC_defaultmap, StartLoc, EndLoc), LParenLoc(LParenLoc),
3981 :
OMPClause(OMPC_defaultmap, SourceLocation(), SourceLocation()),
4006 return T->getClauseKind() == OMPC_defaultmap;
4010 return child_range(child_iterator(), child_iterator());
4025 OMPToClause, Expr *, ValueDecl *, unsigned,
4026 OMPClauseMappableExprCommon::MappableComponent> {
4034 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
4035 return varlist_size();
4037 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
4038 return getUniqueDeclarationsNum();
4040 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
4041 return getUniqueDeclarationsNum() + getTotalComponentListNum();
4054 explicit OMPToClause(SourceLocation StartLoc, SourceLocation LParenLoc,
4055 SourceLocation EndLoc,
unsigned NumVars,
4056 unsigned NumUniqueDeclarations,
4057 unsigned NumComponentLists,
unsigned NumComponents)
4059 NumUniqueDeclarations, NumComponentLists,
4070 explicit OMPToClause(
unsigned NumVars,
unsigned NumUniqueDeclarations,
4071 unsigned NumComponentLists,
unsigned NumComponents)
4073 OMPC_to, SourceLocation(), SourceLocation(), SourceLocation(),
4074 NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents) {}
4087 SourceLocation LParenLoc, SourceLocation EndLoc,
4088 ArrayRef<Expr *> Vars,
4089 ArrayRef<ValueDecl *> Declarations,
4090 MappableExprComponentListsRef ComponentLists);
4103 unsigned NumUniqueDeclarations,
4104 unsigned NumComponentLists,
4105 unsigned NumComponents);
4108 return T->getClauseKind() == OMPC_to;
4112 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
4113 reinterpret_cast<Stmt **>(varlist_end()));
4129 OMPFromClause, Expr *, ValueDecl *, unsigned,
4130 OMPClauseMappableExprCommon::MappableComponent> {
4138 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
4139 return varlist_size();
4141 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
4142 return getUniqueDeclarationsNum();
4144 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
4145 return getUniqueDeclarationsNum() + getTotalComponentListNum();
4158 explicit OMPFromClause(SourceLocation StartLoc, SourceLocation LParenLoc,
4159 SourceLocation EndLoc,
unsigned NumVars,
4160 unsigned NumUniqueDeclarations,
4161 unsigned NumComponentLists,
unsigned NumComponents)
4163 NumVars, NumUniqueDeclarations,
4164 NumComponentLists, NumComponents) {}
4174 explicit OMPFromClause(
unsigned NumVars,
unsigned NumUniqueDeclarations,
4175 unsigned NumComponentLists,
unsigned NumComponents)
4177 OMPC_from, SourceLocation(), SourceLocation(), SourceLocation(),
4178 NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents) {}
4191 SourceLocation LParenLoc, SourceLocation EndLoc,
4192 ArrayRef<Expr *> Vars,
4193 ArrayRef<ValueDecl *> Declarations,
4194 MappableExprComponentListsRef ComponentLists);
4207 unsigned NumUniqueDeclarations,
4208 unsigned NumComponentLists,
4209 unsigned NumComponents);
4212 return T->getClauseKind() == OMPC_from;
4216 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
4217 reinterpret_cast<Stmt **>(varlist_end()));
4244 SourceLocation EndLoc,
unsigned N)
4246 LParenLoc, EndLoc, N) {}
4254 OMPC_use_device_ptr, SourceLocation(), SourceLocation(),
4255 SourceLocation(), N) {}
4268 SourceLocation EndLoc, ArrayRef<Expr *> VL);
4277 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
4278 reinterpret_cast<Stmt **>(varlist_end()));
4282 return T->getClauseKind() == OMPC_use_device_ptr;
4309 SourceLocation EndLoc,
unsigned N)
4311 LParenLoc, EndLoc, N) {}
4319 OMPC_is_device_ptr, SourceLocation(), SourceLocation(),
4320 SourceLocation(), N) {}
4333 SourceLocation EndLoc, ArrayRef<Expr *> VL);
4342 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
4343 reinterpret_cast<Stmt **>(varlist_end()));
4347 return T->getClauseKind() == OMPC_is_device_ptr;
4352 #endif // LLVM_CLANG_AST_OPENMPCLAUSE_H
static OMPPrivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PrivateVL)
Creates clause with a list of variables VL.
OMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'capture' clause.
private_copies_const_range private_copies() const
varlist_const_range varlists() const
helper_expr_range source_exprs()
OMPHintClause()
Build an empty clause.
static OMPReductionClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, ArrayRef< Expr * > Privates, ArrayRef< Expr * > LHSExprs, ArrayRef< Expr * > RHSExprs, ArrayRef< Expr * > ReductionOps, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL.
static const Decl * getCanonicalDecl(const Decl *D)
OMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'untied' clause.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
llvm::iterator_range< private_copies_iterator > private_copies_range
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Iterator that browse the components by lists.
OMPSeqCstClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents clause 'copyin' in the '#pragma omp ...' directives.
helper_expr_range source_exprs()
SourceLocation getColonLoc() const
Get colon location.
helper_expr_const_range source_exprs() const
const Expr * getChunkSize() const
Get chunk size.
static bool classof(const OMPClause *T)
std::pair< const ValueDecl *, MappableExprComponentListRef > operator*() const
MutableArrayRef< Expr * >::iterator inits_iterator
SourceLocation getCommaLoc()
Get location of ','.
helper_expr_range privates()
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
Expr * getSimdlen() const
Return safe iteration space distance.
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
const_component_lists_iterator(const ValueDecl *Declaration, ArrayRef< ValueDecl * > UniqueDecls, ArrayRef< unsigned > DeclsListNum, ArrayRef< unsigned > CumulativeListSizes, MappableExprComponentListRef Components)
Construct an iterator that scan lists for a given declaration Declaration.
private_copies_range private_copies()
static bool classof(const OMPClause *T)
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
static bool classof(const OMPClause *T)
ArrayRef< MappableComponent > MappableExprComponentListRef
OMPUpdateClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'update' clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
OpenMPProcBindClauseKind getProcBindKind() const
Returns kind of the clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
static OMPFirstprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
llvm::iterator_range< child_iterator > child_range
This represents 'if' clause in the '#pragma omp ...' directive.
const_component_lists_range component_lists() const
OMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'simd' clause.
This represents 'priority' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation getColonLoc() const
Returns the location of ':'.
This represents 'update' clause in the '#pragma omp atomic' directive.
void setComponents(ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
Set the components that are in the trailing objects of the class.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Get colon location.
ArrayRef< const Expr * > getVarRefs() const
Fetches list of all variables in the clause.
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Expr * getAlignment()
Returns alignment.
OMPOrderedClause(Expr *Num, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'ordered' clause.
static OMPReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
llvm::iterator_range< const_all_decls_iterator > const_all_decls_range
static bool classof(const OMPClause *T)
This represents 'read' clause in the '#pragma omp atomic' directive.
OMPFinalClause()
Build an empty clause.
Expr * getNumTeams() const
Return NumTeams number.
helper_expr_range source_exprs()
This represents clause 'private' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
static bool classof(const OMPClause *T)
ArrayRef< const Expr * >::iterator private_copies_const_iterator
const Expr * getPostUpdateExpr() const
Get post-update expression for the clause.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
ArrayRef< MappableComponent >::iterator const_all_components_iterator
OpenMPDefaultmapClauseModifier getDefaultmapModifier() const
Get the modifier of the clause.
This represents clauses with a list of expressions that are mappable.
MutableArrayRef< Expr * >::iterator privates_iterator
bool varlist_empty() const
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
OMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Cond, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Build 'if' clause with condition Cond.
static bool classof(const OMPClause *T)
OMPNumTasksClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_tasks' clause.
OMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'nogroup' clause.
Expr * getNumForLoops() const
Return the number of associated for-loops.
llvm::iterator_range< private_copies_iterator > private_copies_range
OMPThreadLimitClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'thread_limit' clause.
Struct that defines common infrastructure to handle mappable expressions used in OpenMP clauses...
This represents 'nogroup' clause in the '#pragma omp ...' directive.
This represents 'safelen' clause in the '#pragma omp ...' directive.
void setClauseInfo(ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
Fill the clause information from the list of declarations and associated component lists...
static bool classof(const OMPClause *T)
OMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'hint' clause with expression Hint.
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getNumThreads() const
Returns number of threads.
This represents clauses with the list of variables like 'private', 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the '#pragma omp ...' directives.
OMPProcBindClause()
Build an empty clause.
Expr * getAssociatedExpression() const
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
SourceLocation getLParenLoc() const
Returns the location of '('.
static OMPSharedClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
ArrayRef< const Expr * >::iterator updates_const_iterator
clang::OMPLinearClause OMPVarListClause, OMPClauseWithPostUpdate, llvm::TrailingObjects getPrivates()
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
ArrayRef< const Expr * >::iterator finals_const_iterator
This represents 'simd' clause in the '#pragma omp ...' directive.
const_component_lists_iterator(ArrayRef< ValueDecl * > UniqueDecls, ArrayRef< unsigned > DeclsListNum, ArrayRef< unsigned > CumulativeListSizes, MappableExprComponentListRef Components)
Construct an iterator that scans all lists.
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
static bool classof(const OMPClause *T)
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
static bool classof(const OMPClause *T)
helper_expr_range assignment_ops()
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
OMPSIMDClause()
Build an empty clause.
void setUpdates(ArrayRef< Expr * > UL)
Sets the list of update expressions for linear variables.
OMPPriorityClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'priority' clause.
SourceLocation getLocStart() const
Returns the starting location of the clause.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
OMPVarListClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
Build a clause with N variables.
varlist_iterator varlist_begin()
Expr * getChunkSize()
Get chunk size.
This represents clause 'map' in the '#pragma omp ...' directives.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents clause 'to' in the '#pragma omp ...' directives.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
ArrayRef< const Expr * >::iterator private_copies_const_iterator
private_copies_const_range private_copies() const
OMPMappableExprListClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Build a clause for NumUniqueDeclarations declarations, NumComponentLists total component lists...
void setPreInitStmt(Stmt *S)
Set pre-initialization statement for the clause.
Defines some OpenMP-specific enums and functions.
OMPPriorityClause()
Build an empty clause.
llvm::iterator_range< varlist_const_iterator > varlist_const_range
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Expr * getNumTeams()
Return NumTeams number.
const_component_lists_iterator decl_component_lists_end() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
llvm::iterator_range< updates_iterator > updates_range
OMPDefaultmapClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KLoc, SourceLocation EndLoc, OpenMPDefaultmapClauseKind Kind, OpenMPDefaultmapClauseModifier M)
Build 'defaultmap' clause with defaultmap kind Kind.
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
MutableArrayRef< unsigned > getComponentListSizesRef()
Get the cumulative component lists sizes that are in the trailing objects of the class.
llvm::iterator_range< const_all_lists_sizes_iterator > const_all_lists_sizes_range
OMPSafelenClause()
Build an empty clause.
llvm::iterator_range< varlist_iterator > varlist_range
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
SourceLocation getFirstScheduleModifierLoc() const
Get the first modifier location.
llvm::iterator_range< const_component_lists_iterator > const_component_lists_range
void setModifierLoc(SourceLocation Loc)
Set modifier location.
void setCalcStep(Expr *CalcStep)
Sets the expression to calculate linear step for clause.
OpenMPLinearClauseKind getModifier() const
Return modifier.
helper_expr_range destination_exprs()
helper_expr_const_range private_copies() const
SourceLocation getDefaultmapKindLoc()
Get kind location.
void setFinals(ArrayRef< Expr * > FL)
Sets the list of final update expressions for linear variables.
llvm::iterator_range< privates_const_iterator > privates_const_range
static bool classof(const OMPClause *T)
helper_expr_const_range source_exprs() const
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
ArrayRef< ValueDecl * > getUniqueDeclsRef() const
Get the unique declarations that are in the trailing objects of the class.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPDistScheduleClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KLoc, SourceLocation CommaLoc, SourceLocation EndLoc, OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, Stmt *HelperChunkSize)
Build 'dist_schedule' clause with schedule kind Kind and chunk size expression ChunkSize.
Expr * getThreadLimit() const
Return ThreadLimit number.
static bool classof(const OMPClause *T)
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc...
This represents 'default' clause in the '#pragma omp ...' directive.
OMPProcBindClause(OpenMPProcBindClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'proc_bind' clause with argument A ('master', 'close' or 'spread').
OMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'write' clause.
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
This represents clause 'reduction' in the '#pragma omp ...' directives.
OMPNogroupClause()
Build an empty clause.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
static bool classof(const OMPClause *T)
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
Expr * getHint() const
Returns number of threads.
detail::InMemoryDirectory::const_iterator I
Expr * getPostUpdateExpr()
Get post-update expression for the clause.
static bool classof(const OMPClause *T)
llvm::iterator_range< finals_const_iterator > finals_const_range
OMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'seq_cst' clause.
void setModifier(OpenMPLinearClauseKind Kind)
Set modifier.
This represents clause 'from' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
OMPScheduleClause()
Build an empty clause.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
OMPGrainsizeClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'grainsize' clause.
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
OMPCollapseClause(Expr *Num, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'collapse' clause.
ArrayRef< unsigned >::iterator const_all_num_lists_iterator
SourceLocation getLocEnd() const
Returns the ending location of the clause.
static bool classof(const OMPClause *)
OMPDistScheduleClause()
Build an empty clause.
static bool classof(const OMPClause *T)
llvm::iterator_range< inits_const_iterator > inits_const_range
OMPLinearClause(SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, unsigned NumVars)
Build 'linear' clause with given number of variables NumVars.
This represents 'threads' clause in the '#pragma omp ...' directive.
const_child_range children() const
friend class OMPClauseReader
helper_expr_range assignment_ops()
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
OMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'nowait' clause.
This represents clause 'aligned' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
void setLocEnd(SourceLocation Loc)
Sets the ending location of the clause.
OMPWriteClause()
Build an empty clause.
MutableArrayRef< Expr * >::iterator varlist_iterator
static bool classof(const OMPClause *T)
OMPCaptureClause()
Build an empty clause.
static bool classof(const OMPClause *T)
OMPSafelenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'safelen' clause.
varlist_const_iterator varlist_end() const
static bool classof(const OMPClause *T)
helper_expr_range assignment_ops()
This represents implicit clause 'depend' for the '#pragma omp task' directive.
Expr * getStep()
Returns linear step.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
Expr - This represents one expression.
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
llvm::iterator_range< inits_iterator > inits_range
helper_expr_const_range assignment_ops() const
This represents 'simdlen' clause in the '#pragma omp ...' directive.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
SourceLocation getScheduleKindLoc()
Get kind location.
ArrayRef< unsigned > getComponentListSizesRef() const
Get the cumulative component lists sizes that are in the trailing objects of the class.
SmallVector< MappableExprComponentList, 8 > MappableExprComponentLists
Expr * getCondition() const
Returns condition.
MutableArrayRef< Expr * > getVarRefs()
Fetches list of variables associated with this clause.
const Expr * getAlignment() const
Returns alignment.
void setInits(ArrayRef< Expr * > IL)
Sets the list of the initial values for linear variables.
OpenMPClauseKind
OpenMP clauses.
static bool classof(const OMPClause *T)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
MutableArrayRef< Expr * >::iterator private_copies_iterator
SourceLocation getLParenLoc() const
Returns the location of '('.
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
static bool classof(const OMPClause *T)
llvm::iterator_range< const_child_iterator > const_child_range
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setDeclNumLists(ArrayRef< unsigned > DNLs)
Set the number of lists per declaration that are in the trailing objects of the class.
This represents 'ordered' clause in the '#pragma omp ...' directive.
const_all_components_range all_components() const
MutableArrayRef< unsigned > getDeclNumListsRef()
Get the number of lists per declaration that are in the trailing objects of the class.
Expr * getCalcStep()
Returns expression to calculate linear step.
const_all_num_lists_range all_num_lists() const
SourceLocation getColonLoc() const
Return the location of ':'.
ArrayRef< const Expr * >::iterator varlist_const_iterator
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
static bool classof(const OMPClause *T)
static bool classof(const OMPClause *T)
void setPrivateCopies(ArrayRef< Expr * > PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
inits_const_range inits() const
ValueDecl * getAssociatedDeclaration() const
Expr * getDevice()
Return device number.
static OMPPrivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
SourceLocation getCommaLoc()
Get location of ','.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
MutableArrayRef< Expr * >::iterator helper_expr_iterator
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
OpenMPProcBindClauseKind
OpenMP attributes for 'proc_bind' clause.
const_component_lists_range decl_component_lists(const ValueDecl *VD) const
const_component_lists_iterator component_lists_end() const
llvm::iterator_range< inits_const_iterator > inits_const_range
OMPThreadLimitClause()
Build an empty clause.
helper_expr_const_range privates() const
helper_expr_range destination_exprs()
helper_expr_const_range destination_exprs() const
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
helper_expr_range lhs_exprs()
static bool classof(const OMPClause *T)
ArrayRef< const Expr * >::iterator inits_const_iterator
OMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'mergeable' clause.
static bool classof(const OMPClause *T)
static bool classof(const OMPClause *T)
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
SourceLocation getLParenLoc()
Get location of '('.
helper_expr_range destination_exprs()
OMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_threads' clause with condition NumThreads.
void setUniqueDecls(ArrayRef< ValueDecl * > UDs)
Set the unique declarations that are in the trailing objects of the class.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
OMPSimdlenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'simdlen' clause.
SourceLocation getLParenLoc()
Get location of '('.
MappableComponent(Expr *AssociatedExpression, ValueDecl *AssociatedDeclaration)
helper_expr_range private_copies()
ArrayRef< const Expr * >::iterator inits_const_iterator
static OMPFirstprivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PrivateVL, ArrayRef< Expr * > InitVL, Stmt *PreInit)
Creates clause with a list of variables VL.
OMPCollapseClause()
Build an empty clause.
static bool classof(const OMPClause *T)
OMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'threads' clause.
Expr * getNumForLoops() const
Return the number of associated for-loops.
Encodes a location in the source.
StmtIterator child_iterator
This represents 'hint' clause in the '#pragma omp ...' directive.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
helper_expr_const_range reduction_ops() const
MutableArrayRef< Expr * > getInits()
const TemplateArgument * iterator
helper_expr_range rhs_exprs()
SourceLocation getLParenLoc() const
Returns the location of '('.
private_copies_range private_copies()
void setVarRefs(ArrayRef< Expr * > VL)
Sets the list of variables for this clause.
const_component_lists_iterator decl_component_lists_begin(const ValueDecl *VD) const
Iterators for component lists associated with the provided declaration.
const_component_lists_iterator component_lists_begin() const
Iterators for all component lists.
Expr * getCondition() const
Returns condition.
helper_expr_const_range lhs_exprs() const
This represents 'schedule' clause in the '#pragma omp ...' directive.
OMPMergeableClause()
Build an empty clause.
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PL, ArrayRef< Expr * > IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OpenMPDirectiveKind
OpenMP directives.
This represents clause 'shared' in the '#pragma omp ...' directives.
OMPNumTeamsClause()
Build an empty clause.
varlist_const_iterator varlist_begin() const
const_all_lists_sizes_range all_lists_sizes() const
Expr * getPriority()
Return Priority number.
MutableArrayRef< Expr * >::iterator helper_expr_iterator
OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
static bool classof(const OMPClause *T)
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
const_component_lists_iterator & operator++()
This is a basic class for representing single OpenMP clause.
SourceLocation getDefaultmapModifierLoc() const
Get the modifier location.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
OMPDeviceClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'device' clause.
OpenMPMapClauseKind getMapTypeModifier() const LLVM_READONLY
Fetches the map type modifier for the clause.
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
ArrayRef< const Expr * >::iterator privates_const_iterator
SourceLocation getDependencyLoc() const
Get dependency type location.
OMPNumTeamsClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_teams' clause.
helper_expr_range reduction_ops()
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
static bool classof(const OMPClause *T)
llvm::iterator_range< helper_expr_iterator > helper_expr_range
Expr * getGrainsize() const
Return safe iteration space distance.
const Expr * getChunkSize() const
Get chunk size.
OMPDefaultmapClause()
Build an empty clause.
void setStep(Expr *Step)
Sets the linear step for clause.
llvm::iterator_range< const_all_num_lists_iterator > const_all_num_lists_range
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
const_all_decls_range all_decls() const
This represents 'device' clause in the '#pragma omp ...' directive.
helper_expr_const_range rhs_exprs() const
OMPThreadsClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation ModifierLoc
Location of linear modifier if any.
Expr * getDevice() const
Return device number.
static bool classof(const OMPClause *T)
static bool classof(const OMPClause *T)
ArrayRef< MappableExprComponentList > MappableExprComponentListsRef
OMPNumThreadsClause()
Build an empty clause.
Expr * getNumTasks() const
Return safe iteration space distance.
MutableArrayRef< ValueDecl * > getUniqueDeclsRef()
Get the unique declarations that are in the trailing objects of the class.
SourceLocation getLParenLoc()
Get location of '('.
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
Stmt * getPreInitStmt()
Get pre-initialization statement for the clause.
U cast(CodeGen::Address addr)
static bool classof(const OMPClause *T)
This represents clause 'linear' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
detail::InMemoryDirectory::const_iterator E
SourceLocation getColonLoc() const
Returns the location of ':'.
static bool classof(const OMPClause *T)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
llvm::iterator_range< privates_iterator > privates_range
ArrayRef< ValueDecl * >::iterator const_all_decls_iterator
Iterators to access all the declarations, number of lists, list sizes, and components.
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
static OMPSharedClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
static bool classof(const OMPClause *T)
std::pair< const ValueDecl *, MappableExprComponentListRef > operator->() const
bool isImplicitMapType() const LLVM_READONLY
Is this an implicit map type? We have to capture 'IsMapTypeImplicit' from the parser for more informa...
llvm::iterator_range< inits_iterator > inits_range
SmallVector< MappableComponent, 8 > MappableExprComponentList
void setComponentListSizes(ArrayRef< unsigned > CLSs)
Set the cumulative component lists sizes that are in the trailing objects of the class.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
Expr * getSafelen() const
Return safe iteration space distance.
Expr * getPriority() const
Return Priority number.
OMPDefaultClause(OpenMPDefaultClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'default' clause with argument A ('none' or 'shared').
MutableArrayRef< Expr * >::iterator helper_expr_iterator
ConstStmtIterator const_child_iterator
OMPReadClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
static OMPLastprivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > SrcExprs, ArrayRef< Expr * > DstExprs, ArrayRef< Expr * > AssignmentOps, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL.
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPUntiedClause()
Build an empty clause.
ArrayRef< unsigned > getDeclNumListsRef() const
Get the number of lists per declaration that are in the trailing objects of the class.
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
OMPFinalClause(Expr *Cond, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'final' clause with condition Cond.
OpenMPDefaultClauseKind
OpenMP attributes for 'default' clause.
OMPDeviceClause()
Build an empty clause.
SourceLocation getDistScheduleKindLoc()
Get kind location.
OMPNowaitClause()
Build an empty clause.
privates_range privates()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
This represents 'write' clause in the '#pragma omp atomic' directive.
MutableArrayRef< Expr * >::iterator inits_iterator
OMPNumTasksClause()
Build an empty clause.
MutableArrayRef< Expr * >::iterator private_copies_iterator
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
helper_expr_const_range destination_exprs() const
llvm::iterator_range< const_all_components_iterator > const_all_components_range
Defines the clang::SourceLocation class and associated facilities.
This represents 'nowait' clause in the '#pragma omp ...' directive.
MutableArrayRef< MappableComponent > getComponentsRef()
Get the components that are in the trailing objects of the class.
varlist_iterator varlist_end()
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
MutableArrayRef< Expr * >::iterator finals_iterator
Privates[]
Gets the list of initial values for linear variables.
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
MutableArrayRef< Expr * >::iterator updates_iterator
OMPClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
OMPSimdlenClause()
Build an empty clause.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
helper_expr_const_range assignment_ops() const
Expr * getThreadLimit()
Return ThreadLimit number.
OpenMPDefaultmapClauseKind getDefaultmapKind() const
Get kind of the clause.
OMPIfClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPScheduleClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KLoc, SourceLocation CommaLoc, SourceLocation EndLoc, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, Stmt *HelperChunkSize, OpenMPScheduleClauseModifier M1, SourceLocation M1Loc, OpenMPScheduleClauseModifier M2, SourceLocation M2Loc)
Build 'schedule' clause with schedule kind Kind and chunk size expression ChunkSize.
OMPUpdateClause()
Build an empty clause.
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
void setPrivates(ArrayRef< Expr * > PL)
Sets the list of the copies of original linear variables.
llvm::iterator_range< updates_const_iterator > updates_const_range
OMPGrainsizeClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
Expr * getChunkSize()
Get chunk size.
llvm::iterator_range< finals_iterator > finals_range
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
ArrayRef< unsigned >::iterator const_all_lists_sizes_iterator
OMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'read' clause.
helper_expr_const_range destination_exprs() const
SourceLocation getModifierLoc() const
Return modifier location.
OMPClauseWithPostUpdate(const OMPClause *This)
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
static bool classof(const OMPClause *T)
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
SourceLocation ColonLoc
Location of ':'.
ArrayRef< MappableComponent > getComponentsRef() const
Get the components that are in the trailing objects of the class.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
unsigned varlist_size() const
OMPOrderedClause()
Build an empty clause.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
OMPDefaultClause()
Build an empty clause.
static bool classof(const OMPClause *T)
helper_expr_const_range assignment_ops() const
OMPClauseWithPreInit(const OMPClause *This)
helper_expr_const_range source_exprs() const
static bool classof(const OMPClause *T)