16 #ifndef LLVM_CLANG_AST_OPENMPCLAUSE_H 17 #define LLVM_CLANG_AST_OPENMPCLAUSE_H 28 #include "llvm/ADT/ArrayRef.h" 29 #include "llvm/ADT/MapVector.h" 30 #include "llvm/ADT/SmallVector.h" 31 #include "llvm/ADT/iterator.h" 32 #include "llvm/ADT/iterator_range.h" 33 #include "llvm/Frontend/OpenMP/OMPConstants.h" 34 #include "llvm/Support/Casting.h" 35 #include "llvm/Support/Compiler.h" 36 #include "llvm/Support/TrailingObjects.h" 63 : StartLoc(StartLoc), EndLoc(EndLoc), Kind(K) {}
112 Stmt *PreInit =
nullptr;
119 assert(
get(This) &&
"get is not tuned for pre-init.");
127 CaptureRegion = ThisRegion;
150 Expr *PostUpdate =
nullptr;
154 assert(
get(This) &&
"get is not tuned for post-update.");
182 : StartLoc(StartLoc), LParenLoc(LParenLoc), EndLoc(EndLoc) {}
207 :
OMPClause(K, StartLoc, EndLoc), LParenLoc(LParenLoc), NumVars(N) {}
212 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>(), NumVars);
217 assert(VL.size() == NumVars &&
218 "Number of variables is not the same as the preallocated buffer");
219 std::copy(VL.begin(), VL.end(),
220 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>());
252 return llvm::makeArrayRef(
253 static_cast<const T *>(
this)->
template getTrailingObjects<Expr *>(),
273 Stmt *Allocator =
nullptr;
276 void setAllocator(
Expr *A) { Allocator = A; }
287 :
OMPClause(OMPC_allocator, StartLoc, EndLoc), LParenLoc(LParenLoc),
337 Expr *Allocator =
nullptr;
354 Allocator(Allocator), ColonLoc(ColonLoc) {}
367 void setAllocator(
Expr *A) { Allocator = A; }
397 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
398 reinterpret_cast<Stmt **>(varlist_end()));
432 Stmt *Condition =
nullptr;
444 void setCondition(
Expr *Cond) { Condition = Cond; }
450 void setNameModifierLoc(
SourceLocation Loc) { NameModifierLoc = Loc; }
472 :
OMPClause(OMPC_if, StartLoc, EndLoc), OMPClauseWithPreInit(this),
473 LParenLoc(LParenLoc), Condition(Cond), ColonLoc(ColonLoc),
474 NameModifier(NameModifier), NameModifierLoc(NameModifierLoc) {
475 setPreInitStmt(HelperCond, CaptureRegion);
481 OMPClauseWithPreInit(this) {}
532 Stmt *Condition =
nullptr;
535 void setCondition(
Expr *Cond) { Condition = Cond; }
550 :
OMPClause(OMPC_final, StartLoc, EndLoc), OMPClauseWithPreInit(this),
551 LParenLoc(LParenLoc), Condition(Cond) {
552 setPreInitStmt(HelperCond, CaptureRegion);
558 OMPClauseWithPreInit(this) {}
601 Stmt *NumThreads =
nullptr;
604 void setNumThreads(
Expr *NThreads) { NumThreads = NThreads; }
620 :
OMPClause(OMPC_num_threads, StartLoc, EndLoc),
621 OMPClauseWithPreInit(this), LParenLoc(LParenLoc),
622 NumThreads(NumThreads) {
623 setPreInitStmt(HelperNumThreads, CaptureRegion);
629 OMPClauseWithPreInit(this) {}
677 Stmt *Safelen =
nullptr;
680 void setSafelen(
Expr *Len) { Safelen = Len; }
690 :
OMPClause(OMPC_safelen, StartLoc, EndLoc), LParenLoc(LParenLoc),
742 Stmt *Simdlen =
nullptr;
745 void setSimdlen(
Expr *Len) { Simdlen = Len; }
755 :
OMPClause(OMPC_simdlen, StartLoc, EndLoc), LParenLoc(LParenLoc),
807 Stmt *NumForLoops =
nullptr;
810 void setNumForLoops(
Expr *Num) { NumForLoops = Num; }
821 :
OMPClause(OMPC_collapse, StartLoc, EndLoc), LParenLoc(LParenLoc),
882 void setDefaultKindKwLoc(
SourceLocation KLoc) { KindKwLoc = KLoc; }
895 :
OMPClause(OMPC_default, StartLoc, EndLoc), LParenLoc(LParenLoc),
896 Kind(A), KindKwLoc(ALoc) {}
949 llvm::omp::ProcBindKind
Kind = llvm::omp::OMP_PROC_BIND_unknown;
957 void setProcBindKind(llvm::omp::ProcBindKind K) { Kind = K; }
962 void setProcBindKindKwLoc(
SourceLocation KLoc) { KindKwLoc = KLoc; }
976 :
OMPClause(OMPC_proc_bind, StartLoc, EndLoc), LParenLoc(LParenLoc),
977 Kind(A), KindKwLoc(ALoc) {}
1031 :
OMPClause(OMPC_unified_address, StartLoc, EndLoc) {}
1073 :
OMPClause(OMPC_unified_shared_memory, StartLoc, EndLoc) {}
1115 :
OMPClause(OMPC_reverse_offload, StartLoc, EndLoc) {}
1157 :
OMPClause(OMPC_dynamic_allocators, StartLoc, EndLoc) {}
1232 :
OMPClause(OMPC_atomic_default_mem_order, StartLoc, EndLoc),
1233 LParenLoc(LParenLoc), Kind(A), KindKwLoc(ALoc) {}
1291 enum {FIRST, SECOND, NUM_MODIFIERS};
1304 Expr *ChunkSize =
nullptr;
1315 Modifiers[FIRST] = M;
1322 Modifiers[SECOND] = M;
1327 ModifiersLoc[FIRST] = Loc;
1332 ModifiersLoc[SECOND] = Loc;
1340 Modifiers[FIRST] = M;
1343 Modifiers[SECOND] = M;
1365 void setChunkSize(
Expr *E) { ChunkSize = E; }
1386 Expr *ChunkSize,
Stmt *HelperChunkSize,
1389 :
OMPClause(OMPC_schedule, StartLoc, EndLoc), OMPClauseWithPreInit(this),
1390 LParenLoc(LParenLoc), Kind(Kind), KindLoc(KLoc), CommaLoc(CommaLoc),
1391 ChunkSize(ChunkSize) {
1392 setPreInitStmt(HelperChunkSize);
1393 Modifiers[FIRST] = M1;
1394 Modifiers[SECOND] = M2;
1395 ModifiersLoc[FIRST] = M1Loc;
1396 ModifiersLoc[SECOND] = M2Loc;
1402 OMPClauseWithPreInit(this) {
1412 return Modifiers[FIRST];
1417 return Modifiers[SECOND];
1428 return ModifiersLoc[FIRST];
1433 return ModifiersLoc[SECOND];
1446 return child_range(reinterpret_cast<Stmt **>(&ChunkSize),
1447 reinterpret_cast<Stmt **>(&ChunkSize) + 1);
1484 Stmt *NumForLoops =
nullptr;
1487 unsigned NumberOfLoops = 0;
1498 :
OMPClause(OMPC_ordered, StartLoc, EndLoc), LParenLoc(LParenLoc),
1499 NumForLoops(Num), NumberOfLoops(NumLoops) {}
1504 NumberOfLoops(NumLoops) {}
1507 void setNumForLoops(
Expr *Num) { NumForLoops = Num; }
1535 void setLoopNumIterations(
unsigned NumLoop,
Expr *NumIterations);
1540 void setLoopCounter(
unsigned NumLoop,
Expr *Counter);
1542 Expr *getLoopCounter(
unsigned NumLoop);
1543 const Expr *getLoopCounter(
unsigned NumLoop)
const;
1576 :
OMPClause(OMPC_nowait, StartLoc, EndLoc) {}
1615 :
OMPClause(OMPC_untied, StartLoc, EndLoc) {}
1655 :
OMPClause(OMPC_mergeable, StartLoc, EndLoc) {}
1694 :
OMPClause(OMPC_read, StartLoc, EndLoc) {}
1732 :
OMPClause(OMPC_write, StartLoc, EndLoc) {}
1772 :
OMPClause(OMPC_update, StartLoc, EndLoc) {}
1812 :
OMPClause(OMPC_capture, StartLoc, EndLoc) {}
1852 :
OMPClause(OMPC_seq_cst, StartLoc, EndLoc) {}
1922 return llvm::makeArrayRef(varlist_end(), varlist_size());
1949 llvm::iterator_range<private_copies_const_iterator>;
1953 getPrivateCopies().end());
1958 getPrivateCopies().end());
1962 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
1963 reinterpret_cast<Stmt **>(varlist_end()));
1993 public OMPClauseWithPreInit,
2008 LParenLoc, EndLoc, N),
2009 OMPClauseWithPreInit(this) {}
2018 OMPClauseWithPreInit(this) {}
2031 return llvm::makeArrayRef(varlist_end(), varlist_size());
2045 return llvm::makeArrayRef(getPrivateCopies().end(), varlist_size());
2077 llvm::iterator_range<private_copies_const_iterator>;
2081 getPrivateCopies().end());
2085 getPrivateCopies().end());
2101 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2102 reinterpret_cast<Stmt **>(varlist_end()));
2111 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2112 reinterpret_cast<Stmt **>(varlist_end()));
2134 public OMPClauseWithPostUpdate,
2174 LParenLoc, EndLoc, N),
2175 OMPClauseWithPostUpdate(this), LPKind(LPKind), LPKindLoc(LPKindLoc),
2176 ColonLoc(ColonLoc) {}
2185 OMPClauseWithPostUpdate(this) {}
2193 return llvm::makeArrayRef(varlist_end(), varlist_size());
2207 return llvm::makeArrayRef(getPrivateCopies().end(), varlist_size());
2221 return llvm::makeArrayRef(getSourceExprs().end(), varlist_size());
2234 return llvm::makeArrayRef(getDestinationExprs().end(), varlist_size());
2296 llvm::iterator_range<helper_expr_const_iterator>;
2304 getPrivateCopies().end());
2309 getPrivateCopies().end());
2314 getSourceExprs().end());
2323 getDestinationExprs().end());
2328 getDestinationExprs().end());
2333 getAssignmentOps().end());
2338 getAssignmentOps().end());
2342 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2343 reinterpret_cast<Stmt **>(varlist_end()));
2414 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2415 reinterpret_cast<Stmt **>(varlist_end()));
2445 public OMPClauseWithPostUpdate,
2474 LParenLoc, EndLoc, N),
2475 OMPClauseWithPostUpdate(this), ColonLoc(ColonLoc),
2476 QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
2485 OMPClauseWithPostUpdate(this) {}
2506 return llvm::makeArrayRef(varlist_end(), varlist_size());
2519 return llvm::makeArrayRef(
getPrivates().end(), varlist_size());
2534 return llvm::makeArrayRef(getLHSExprs().end(), varlist_size());
2548 return llvm::makeArrayRef(getRHSExprs().end(), varlist_size());
2611 llvm::iterator_range<helper_expr_const_iterator>;
2639 getReductionOps().end());
2644 getReductionOps().end());
2648 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2649 reinterpret_cast<Stmt **>(varlist_end()));
2658 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2659 reinterpret_cast<Stmt **>(varlist_end()));
2681 public OMPClauseWithPostUpdate,
2710 LParenLoc, EndLoc, N),
2711 OMPClauseWithPostUpdate(this), ColonLoc(ColonLoc),
2712 QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
2721 OMPClauseWithPostUpdate(this) {}
2741 return llvm::makeArrayRef(varlist_end(), varlist_size());
2754 return llvm::makeArrayRef(
getPrivates().end(), varlist_size());
2768 return llvm::makeArrayRef(getLHSExprs().end(), varlist_size());
2782 return llvm::makeArrayRef(getRHSExprs().end(), varlist_size());
2845 llvm::iterator_range<helper_expr_const_iterator>;
2873 getReductionOps().end());
2878 getReductionOps().end());
2882 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
2883 reinterpret_cast<Stmt **>(varlist_end()));
2912 public OMPClauseWithPostUpdate,
2941 LParenLoc, EndLoc, N),
2942 OMPClauseWithPostUpdate(this), ColonLoc(ColonLoc),
2943 QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
2952 OMPClauseWithPostUpdate(this) {}
2972 return llvm::makeArrayRef(varlist_end(), varlist_size());
2985 return llvm::makeArrayRef(
getPrivates().end(), varlist_size());
2999 return llvm::makeArrayRef(getLHSExprs().end(), varlist_size());
3013 return llvm::makeArrayRef(getRHSExprs().end(), varlist_size());
3024 return llvm::makeArrayRef(getReductionOps().end(), varlist_size());
3090 llvm::iterator_range<helper_expr_const_iterator>;
3118 getReductionOps().end());
3123 getReductionOps().end());
3128 getTaskgroupDescriptors().end());
3133 getTaskgroupDescriptors().end());
3137 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3138 reinterpret_cast<Stmt **>(varlist_end()));
3168 public OMPClauseWithPostUpdate,
3202 OMPClauseWithPostUpdate(this), Modifier(Modifier),
3203 ModifierLoc(ModifierLoc), ColonLoc(ColonLoc) {}
3212 OMPClauseWithPostUpdate(this) {}
3230 return llvm::makeArrayRef(varlist_end(), varlist_size());
3237 return llvm::makeArrayRef(
getPrivates().end(), varlist_size());
3245 return llvm::makeArrayRef(
getInits().end(), varlist_size());
3253 return llvm::makeArrayRef(
getUpdates().end(), varlist_size());
3261 return llvm::makeArrayRef(
getFinals().end() + 2, varlist_size() + 1);
3401 llvm::iterator_range<used_expressions_iterator>;
3403 llvm::iterator_range<used_expressions_const_iterator>;
3414 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3415 reinterpret_cast<Stmt **>(varlist_end()));
3454 void setAlignment(Expr *A) { *varlist_end() = A; }
3464 SourceLocation ColonLoc, SourceLocation EndLoc,
3468 ColonLoc(ColonLoc) {}
3475 SourceLocation(), SourceLocation(),
3489 SourceLocation LParenLoc,
3490 SourceLocation ColonLoc,
3491 SourceLocation EndLoc, ArrayRef<Expr *> VL,
3513 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3514 reinterpret_cast<Stmt **>(varlist_end()));
3530 return T->getClauseKind() == OMPC_aligned;
3568 SourceLocation EndLoc,
unsigned N)
3577 SourceLocation(), SourceLocation(),
3583 void setSourceExprs(ArrayRef<Expr *> SrcExprs);
3586 MutableArrayRef<Expr *> getSourceExprs() {
3587 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
3589 ArrayRef<const Expr *> getSourceExprs()
const {
3590 return llvm::makeArrayRef(varlist_end(), varlist_size());
3596 void setDestinationExprs(ArrayRef<Expr *> DstExprs);
3599 MutableArrayRef<Expr *> getDestinationExprs() {
3600 return MutableArrayRef<Expr *>(getSourceExprs().end(), varlist_size());
3602 ArrayRef<const Expr *> getDestinationExprs()
const {
3603 return llvm::makeArrayRef(getSourceExprs().end(), varlist_size());
3610 void setAssignmentOps(ArrayRef<Expr *> AssignmentOps);
3613 MutableArrayRef<Expr *> getAssignmentOps() {
3614 return MutableArrayRef<Expr *>(getDestinationExprs().end(), varlist_size());
3616 ArrayRef<const Expr *> getAssignmentOps()
const {
3617 return llvm::makeArrayRef(getDestinationExprs().end(), varlist_size());
3643 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
3644 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
3645 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
3657 llvm::iterator_range<helper_expr_const_iterator>;
3661 getSourceExprs().end());
3670 getDestinationExprs().end());
3675 getDestinationExprs().end());
3680 getAssignmentOps().end());
3685 getAssignmentOps().end());
3689 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3690 reinterpret_cast<Stmt **>(varlist_end()));
3706 return T->getClauseKind() == OMPC_copyin;
3732 SourceLocation EndLoc,
unsigned N)
3734 LParenLoc, EndLoc, N) {}
3741 OMPC_copyprivate, SourceLocation(), SourceLocation(),
3742 SourceLocation(), N) {}
3747 void setSourceExprs(ArrayRef<Expr *> SrcExprs);
3750 MutableArrayRef<Expr *> getSourceExprs() {
3751 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
3753 ArrayRef<const Expr *> getSourceExprs()
const {
3754 return llvm::makeArrayRef(varlist_end(), varlist_size());
3760 void setDestinationExprs(ArrayRef<Expr *> DstExprs);
3763 MutableArrayRef<Expr *> getDestinationExprs() {
3764 return MutableArrayRef<Expr *>(getSourceExprs().end(), varlist_size());
3766 ArrayRef<const Expr *> getDestinationExprs()
const {
3767 return llvm::makeArrayRef(getSourceExprs().end(), varlist_size());
3774 void setAssignmentOps(ArrayRef<Expr *> AssignmentOps);
3777 MutableArrayRef<Expr *> getAssignmentOps() {
3778 return MutableArrayRef<Expr *>(getDestinationExprs().end(), varlist_size());
3780 ArrayRef<const Expr *> getAssignmentOps()
const {
3781 return llvm::makeArrayRef(getDestinationExprs().end(), varlist_size());
3806 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
3807 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
3808 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
3820 llvm::iterator_range<helper_expr_const_iterator>;
3824 getSourceExprs().end());
3833 getDestinationExprs().end());
3838 getDestinationExprs().end());
3843 getAssignmentOps().end());
3848 getAssignmentOps().end());
3852 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3853 reinterpret_cast<Stmt **>(varlist_end()));
3869 return T->getClauseKind() == OMPC_copyprivate;
3897 OMPFlushClause(SourceLocation StartLoc, SourceLocation LParenLoc,
3898 SourceLocation EndLoc,
unsigned N)
3899 : OMPVarListClause<OMPFlushClause>(OMPC_flush, StartLoc, LParenLoc,
3906 : OMPVarListClause<OMPFlushClause>(OMPC_flush, SourceLocation(),
3907 SourceLocation(), SourceLocation(),
3919 SourceLocation LParenLoc, SourceLocation EndLoc,
3920 ArrayRef<Expr *> VL);
3929 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
3930 reinterpret_cast<Stmt **>(varlist_end()));
3946 return T->getClauseKind() == OMPC_flush;
3969 SourceLocation DepLoc;
3975 unsigned NumLoops = 0;
3986 SourceLocation EndLoc,
unsigned N,
unsigned NumLoops)
3988 EndLoc, N), NumLoops(NumLoops) {}
3997 SourceLocation(), SourceLocation(),
3999 NumLoops(NumLoops) {}
4005 void setDependencyLoc(SourceLocation Loc) { DepLoc = Loc; }
4008 void setColonLoc(SourceLocation Loc) { ColonLoc = Loc; }
4024 SourceLocation LParenLoc,
4025 SourceLocation EndLoc,
4027 SourceLocation DepLoc, SourceLocation ColonLoc,
4028 ArrayRef<Expr *> VL,
unsigned NumLoops);
4053 void setLoopData(
unsigned NumLoop, Expr *Cnt);
4056 Expr *getLoopData(
unsigned NumLoop);
4057 const Expr *getLoopData(
unsigned NumLoop)
const;
4060 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
4061 reinterpret_cast<Stmt **>(varlist_end()));
4077 return T->getClauseKind() == OMPC_depend;
4093 SourceLocation LParenLoc;
4096 Stmt *Device =
nullptr;
4101 void setDevice(Expr *E) { Device = E; }
4113 SourceLocation StartLoc, SourceLocation LParenLoc,
4114 SourceLocation EndLoc)
4115 :
OMPClause(OMPC_device, StartLoc, EndLoc), OMPClauseWithPreInit(this),
4116 LParenLoc(LParenLoc), Device(E) {
4117 setPreInitStmt(HelperE, CaptureRegion);
4122 :
OMPClause(OMPC_device, SourceLocation(), SourceLocation()),
4123 OMPClauseWithPreInit(this) {}
4151 return T->getClauseKind() == OMPC_device;
4168 :
OMPClause(OMPC_threads, StartLoc, EndLoc) {}
4172 :
OMPClause(OMPC_threads, SourceLocation(), SourceLocation()) {}
4190 return T->getClauseKind() == OMPC_threads;
4207 :
OMPClause(OMPC_simd, StartLoc, EndLoc) {}
4228 return T->getClauseKind() == OMPC_simd;
4244 Expr *AssociatedExpression =
nullptr;
4249 ValueDecl *AssociatedDeclaration =
nullptr;
4254 ValueDecl *AssociatedDeclaration)
4255 : AssociatedExpression(AssociatedExpression),
4256 AssociatedDeclaration(
4257 AssociatedDeclaration
4264 return AssociatedDeclaration;
4287 getUniqueDeclarationsTotalNumber(ArrayRef<const ValueDecl *> Declarations);
4303 unsigned NumComponentLists,
unsigned NumComponents)
4304 : NumVars(NumVars), NumUniqueDeclarations(NumUniqueDeclarations),
4305 NumComponentLists(NumComponentLists), NumComponents(NumComponents) {}
4318 unsigned NumUniqueDeclarations;
4321 unsigned NumComponentLists;
4324 unsigned NumComponents;
4327 NestedNameSpecifierLoc MapperQualifierLoc;
4330 DeclarationNameInfo MapperIdInfo;
4352 NestedNameSpecifierLoc *MapperQualifierLocPtr =
nullptr,
4353 DeclarationNameInfo *MapperIdInfoPtr =
nullptr)
4356 NumUniqueDeclarations(Sizes.NumUniqueDeclarations),
4357 NumComponentLists(Sizes.NumComponentLists),
4358 NumComponents(Sizes.NumComponents) {
4359 if (MapperQualifierLocPtr)
4360 MapperQualifierLoc = *MapperQualifierLocPtr;
4361 if (MapperIdInfoPtr)
4362 MapperIdInfo = *MapperIdInfoPtr;
4368 return MutableArrayRef<ValueDecl *>(
4369 static_cast<T *
>(
this)->
template getTrailingObjects<ValueDecl *>(),
4370 NumUniqueDeclarations);
4376 return ArrayRef<ValueDecl *>(
4377 static_cast<const T *
>(
this)
4378 ->
template getTrailingObjects<ValueDecl *>(),
4379 NumUniqueDeclarations);
4385 assert(UDs.size() == NumUniqueDeclarations &&
4386 "Unexpected amount of unique declarations.");
4387 std::copy(UDs.begin(), UDs.end(), getUniqueDeclsRef().begin());
4393 return MutableArrayRef<unsigned>(
4394 static_cast<T *
>(
this)->
template getTrailingObjects<unsigned>(),
4395 NumUniqueDeclarations);
4401 return ArrayRef<unsigned>(
4402 static_cast<const T *
>(
this)->
template getTrailingObjects<unsigned>(),
4403 NumUniqueDeclarations);
4409 assert(DNLs.size() == NumUniqueDeclarations &&
4410 "Unexpected amount of list numbers.");
4411 std::copy(DNLs.begin(), DNLs.end(), getDeclNumListsRef().begin());
4417 return MutableArrayRef<unsigned>(
4418 static_cast<T *
>(
this)->
template getTrailingObjects<unsigned>() +
4419 NumUniqueDeclarations,
4426 return ArrayRef<unsigned>(
4427 static_cast<const T *
>(
this)->
template getTrailingObjects<unsigned>() +
4428 NumUniqueDeclarations,
4435 assert(CLSs.size() == NumComponentLists &&
4436 "Unexpected amount of component lists.");
4437 std::copy(CLSs.begin(), CLSs.end(), getComponentListSizesRef().begin());
4442 return MutableArrayRef<MappableComponent>(
4443 static_cast<T *
>(
this)
4444 ->
template getTrailingObjects<MappableComponent>(),
4450 return ArrayRef<MappableComponent>(
4451 static_cast<const T *
>(
this)
4452 ->
template getTrailingObjects<MappableComponent>(),
4460 ArrayRef<unsigned> CLSs) {
4461 assert(Components.size() == NumComponents &&
4462 "Unexpected amount of component lists.");
4463 assert(CLSs.size() == NumComponentLists &&
4464 "Unexpected amount of list sizes.");
4465 std::copy(Components.begin(), Components.end(), getComponentsRef().begin());
4474 assert(getUniqueDeclarationsTotalNumber(Declarations) ==
4475 NumUniqueDeclarations &&
4476 "Unexpected number of mappable expression info entries!");
4477 assert(getComponentsTotalNumber(ComponentLists) == NumComponents &&
4478 "Unexpected total number of components!");
4479 assert(Declarations.size() == ComponentLists.size() &&
4480 "Declaration and component lists size is not consistent!");
4481 assert(Declarations.size() == NumComponentLists &&
4482 "Unexpected declaration and component lists size!");
4487 llvm::MapVector<ValueDecl *, SmallVector<MappableExprComponentListRef, 8>>
4490 auto CI = ComponentLists.begin();
4491 for (
auto DI = Declarations.begin(), DE = Declarations.end(); DI != DE;
4493 assert(!CI->empty() &&
"Invalid component list!");
4494 ComponentListMap[*DI].push_back(*CI);
4499 auto UniqueDeclarations = getUniqueDeclsRef();
4500 auto UDI = UniqueDeclarations.begin();
4502 auto DeclNumLists = getDeclNumListsRef();
4503 auto DNLI = DeclNumLists.begin();
4505 auto ComponentListSizes = getComponentListSizesRef();
4506 auto CLSI = ComponentListSizes.begin();
4508 auto Components = getComponentsRef();
4509 auto CI = Components.begin();
4512 unsigned PrevSize = 0u;
4515 for (
auto &M : ComponentListMap) {
4532 PrevSize +=
C.size();
4539 CI = std::copy(
C.begin(),
C.end(), CI);
4546 MapperQualifierLoc = NNSL;
4551 MapperIdInfo = MapperId;
4557 return llvm::makeMutableArrayRef<Expr *>(
4558 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>() +
4566 return llvm::makeArrayRef<Expr *>(
4567 static_cast<T *
>(
this)->
template getTrailingObjects<Expr *>() +
4576 "Unexpected number of user-defined mappers.");
4577 std::copy(DMDs.begin(), DMDs.end(), getUDMapperRefs().begin());
4593 return MapperQualifierLoc;
4602 :
public llvm::iterator_adaptor_base<
4603 const_component_lists_iterator,
4604 MappableExprComponentListRef::const_iterator,
4605 std::forward_iterator_tag, MappableComponent, ptrdiff_t,
4606 MappableComponent, MappableComponent> {
4608 ArrayRef<ValueDecl *>::iterator DeclCur;
4611 ArrayRef<unsigned>::iterator NumListsCur;
4614 unsigned RemainingLists = 0;
4618 unsigned PrevListSize = 0;
4622 ArrayRef<unsigned>::const_iterator ListSizeCur;
4623 ArrayRef<unsigned>::const_iterator ListSizeEnd;
4626 MappableExprComponentListRef::const_iterator
End;
4631 ArrayRef<ValueDecl *> UniqueDecls, ArrayRef<unsigned> DeclsListNum,
4632 ArrayRef<unsigned> CumulativeListSizes,
4635 Components.begin()),
4636 DeclCur(UniqueDecls.begin()), NumListsCur(DeclsListNum.begin()),
4637 ListSizeCur(CumulativeListSizes.begin()),
4638 ListSizeEnd(CumulativeListSizes.end()), End(Components.end()) {
4639 assert(UniqueDecls.size() == DeclsListNum.size() &&
4640 "Inconsistent number of declarations and list sizes!");
4641 if (!DeclsListNum.empty())
4642 RemainingLists = *NumListsCur;
4648 const ValueDecl *Declaration, ArrayRef<ValueDecl *> UniqueDecls,
4649 ArrayRef<unsigned> DeclsListNum, ArrayRef<unsigned> CumulativeListSizes,
4652 CumulativeListSizes, Components) {
4656 for (; DeclCur != UniqueDecls.end(); ++DeclCur, ++NumListsCur) {
4657 if (*DeclCur == Declaration)
4660 assert(*NumListsCur > 0 &&
"No lists associated with declaration??");
4664 std::advance(ListSizeCur, *NumListsCur - 1);
4665 PrevListSize = *ListSizeCur;
4671 if (ListSizeCur == CumulativeListSizes.end()) {
4673 RemainingLists = 0u;
4679 RemainingLists = *NumListsCur;
4682 ListSizeEnd = ListSizeCur;
4683 std::advance(ListSizeEnd, RemainingLists);
4687 std::advance(this->I, PrevListSize);
4692 std::pair<const ValueDecl *, MappableExprComponentListRef>
4694 assert(ListSizeCur != ListSizeEnd &&
"Invalid iterator!");
4695 return std::make_pair(
4699 std::pair<const ValueDecl *, MappableExprComponentListRef>
4706 assert(ListSizeCur != ListSizeEnd && RemainingLists &&
4707 "Invalid iterator!");
4711 if (std::next(ListSizeCur) == ListSizeEnd) {
4715 std::advance(this->I, *ListSizeCur - PrevListSize);
4716 PrevListSize = *ListSizeCur;
4719 if (!(--RemainingLists)) {
4722 RemainingLists = *NumListsCur;
4723 assert(RemainingLists &&
"No lists in the following declaration??");
4733 llvm::iterator_range<const_component_lists_iterator>;
4737 return const_component_lists_iterator(
4738 getUniqueDeclsRef(), getDeclNumListsRef(), getComponentListSizesRef(),
4739 getComponentsRef());
4742 return const_component_lists_iterator(
4743 ArrayRef<ValueDecl *>(), ArrayRef<unsigned>(), ArrayRef<unsigned>(),
4745 getComponentsRef().end()));
4748 return {component_lists_begin(), component_lists_end()};
4753 const_component_lists_iterator
4755 return const_component_lists_iterator(
4756 VD, getUniqueDeclsRef(), getDeclNumListsRef(),
4757 getComponentListSizesRef(), getComponentsRef());
4760 return component_lists_end();
4763 return {decl_component_lists_begin(VD), decl_component_lists_end()};
4772 auto A = getUniqueDeclsRef();
4778 llvm::iterator_range<const_all_num_lists_iterator>;
4781 auto A = getDeclNumListsRef();
4787 llvm::iterator_range<const_all_lists_sizes_iterator>;
4790 auto A = getComponentListSizesRef();
4796 llvm::iterator_range<const_all_components_iterator>;
4799 auto A = getComponentsRef();
4807 llvm::iterator_range<mapperlist_const_iterator>;
4812 return getUDMapperRefs().begin();
4815 return getUDMapperRefs().end();
4835 OMPMapClause, Expr *, ValueDecl *, unsigned,
4836 OMPClauseMappableExprCommon::MappableComponent> {
4844 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
4847 return 2 * varlist_size();
4849 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
4850 return getUniqueDeclarationsNum();
4852 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
4853 return getUniqueDeclarationsNum() + getTotalComponentListNum();
4858 static constexpr
unsigned NumberOfModifiers =
4865 OMPC_MAP_MODIFIER_unknown};
4868 SourceLocation MapTypeModifiersLoc[NumberOfModifiers];
4874 bool MapTypeIsImplicit =
false;
4877 SourceLocation MapLoc;
4902 explicit OMPMapClause(ArrayRef<OpenMPMapModifierKind> MapModifiers,
4903 ArrayRef<SourceLocation> MapModifiersLoc,
4904 NestedNameSpecifierLoc MapperQualifierLoc,
4905 DeclarationNameInfo MapperIdInfo,
4907 SourceLocation MapLoc,
const OMPVarListLocTy &Locs,
4911 MapType(MapType), MapTypeIsImplicit(MapTypeIsImplicit), MapLoc(MapLoc) {
4912 assert(llvm::array_lengthof(MapTypeModifiers) == MapModifiers.size() &&
4913 "Unexpected number of map type modifiers.");
4914 llvm::copy(MapModifiers, std::begin(MapTypeModifiers));
4916 assert(llvm::array_lengthof(MapTypeModifiersLoc) ==
4917 MapModifiersLoc.size() &&
4918 "Unexpected number of map type modifier locations.");
4919 llvm::copy(MapModifiersLoc, std::begin(MapTypeModifiersLoc));
4937 assert(I < NumberOfModifiers &&
4938 "Unexpected index to store map type modifier, exceeds array size.");
4939 MapTypeModifiers[I] = T;
4946 void setMapTypeModifierLoc(
unsigned I, SourceLocation TLoc) {
4947 assert(I < NumberOfModifiers &&
4948 "Index to store map type modifier location exceeds array size.");
4949 MapTypeModifiersLoc[I] = TLoc;
4960 void setMapLoc(SourceLocation TLoc) { MapLoc = TLoc; }
4963 void setColonLoc(SourceLocation Loc) { ColonLoc = Loc; }
4986 Create(
const ASTContext &
C,
const OMPVarListLocTy &Locs,
4987 ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
4989 ArrayRef<Expr *> UDMapperRefs,
4990 ArrayRef<OpenMPMapModifierKind> MapModifiers,
4991 ArrayRef<SourceLocation> MapModifiersLoc,
4992 NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId,
5022 assert(Cnt < NumberOfModifiers &&
5023 "Requested modifier exceeds the total number of modifiers.");
5024 return MapTypeModifiers[Cnt];
5032 assert(Cnt < NumberOfModifiers &&
5033 "Requested modifier location exceeds total number of modifiers.");
5034 return MapTypeModifiersLoc[Cnt];
5039 return llvm::makeArrayRef(MapTypeModifiers);
5044 return llvm::makeArrayRef(MapTypeModifiersLoc);
5048 SourceLocation
getMapLoc() const LLVM_READONLY {
return MapLoc; }
5055 reinterpret_cast<Stmt **>(varlist_begin()),
5056 reinterpret_cast<Stmt **>(varlist_end()));
5065 if (MapType == OMPC_MAP_to || MapType == OMPC_MAP_tofrom)
5066 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
5067 reinterpret_cast<Stmt **>(varlist_end()));
5077 return T->getClauseKind() == OMPC_map;
5093 SourceLocation LParenLoc;
5096 Stmt *NumTeams =
nullptr;
5101 void setNumTeams(Expr *E) { NumTeams = E; }
5114 SourceLocation StartLoc, SourceLocation LParenLoc,
5115 SourceLocation EndLoc)
5116 :
OMPClause(OMPC_num_teams, StartLoc, EndLoc), OMPClauseWithPreInit(this),
5117 LParenLoc(LParenLoc), NumTeams(E) {
5118 setPreInitStmt(HelperE, CaptureRegion);
5123 :
OMPClause(OMPC_num_teams, SourceLocation(), SourceLocation()),
5124 OMPClauseWithPreInit(this) {}
5152 return T->getClauseKind() == OMPC_num_teams;
5168 SourceLocation LParenLoc;
5171 Stmt *ThreadLimit =
nullptr;
5176 void setThreadLimit(Expr *E) { ThreadLimit = E; }
5190 SourceLocation StartLoc, SourceLocation LParenLoc,
5191 SourceLocation EndLoc)
5192 :
OMPClause(OMPC_thread_limit, StartLoc, EndLoc),
5193 OMPClauseWithPreInit(this), LParenLoc(LParenLoc), ThreadLimit(E) {
5194 setPreInitStmt(HelperE, CaptureRegion);
5199 :
OMPClause(OMPC_thread_limit, SourceLocation(), SourceLocation()),
5200 OMPClauseWithPreInit(this) {}
5228 return T->getClauseKind() == OMPC_thread_limit;
5244 SourceLocation LParenLoc;
5252 void setPriority(Expr *E) { Priority = E; }
5266 SourceLocation LParenLoc, SourceLocation EndLoc)
5267 :
OMPClause(OMPC_priority, StartLoc, EndLoc), OMPClauseWithPreInit(this),
5268 LParenLoc(LParenLoc), Priority(Priority) {
5269 setPreInitStmt(HelperPriority, CaptureRegion);
5274 :
OMPClause(OMPC_priority, SourceLocation(), SourceLocation()),
5275 OMPClauseWithPreInit(this) {}
5302 return T->getClauseKind() == OMPC_priority;
5318 SourceLocation LParenLoc;
5321 Stmt *Grainsize =
nullptr;
5324 void setGrainsize(Expr *Size) { Grainsize = Size; }
5337 SourceLocation LParenLoc, SourceLocation EndLoc)
5338 :
OMPClause(OMPC_grainsize, StartLoc, EndLoc), OMPClauseWithPreInit(this),
5339 LParenLoc(LParenLoc), Grainsize(Size) {
5340 setPreInitStmt(HelperSize, CaptureRegion);
5345 :
OMPClause(OMPC_grainsize, SourceLocation(), SourceLocation()),
5346 OMPClauseWithPreInit(this) {}
5370 return T->getClauseKind() == OMPC_grainsize;
5387 :
OMPClause(OMPC_nogroup, StartLoc, EndLoc) {}
5391 :
OMPClause(OMPC_nogroup, SourceLocation(), SourceLocation()) {}
5409 return T->getClauseKind() == OMPC_nogroup;
5425 SourceLocation LParenLoc;
5428 Stmt *NumTasks =
nullptr;
5431 void setNumTasks(Expr *Size) { NumTasks = Size; }
5444 SourceLocation LParenLoc, SourceLocation EndLoc)
5445 :
OMPClause(OMPC_num_tasks, StartLoc, EndLoc), OMPClauseWithPreInit(this),
5446 LParenLoc(LParenLoc), NumTasks(Size) {
5447 setPreInitStmt(HelperSize, CaptureRegion);
5452 :
OMPClause(OMPC_num_tasks, SourceLocation(), SourceLocation()),
5453 OMPClauseWithPreInit(this) {}
5477 return T->getClauseKind() == OMPC_num_tasks;
5492 SourceLocation LParenLoc;
5495 Stmt *Hint =
nullptr;
5498 void setHint(Expr *H) { Hint = H; }
5508 SourceLocation EndLoc)
5509 :
OMPClause(OMPC_hint, StartLoc, EndLoc), LParenLoc(LParenLoc),
5522 Expr *
getHint()
const {
return cast_or_null<Expr>(Hint); }
5538 return T->getClauseKind() == OMPC_hint;
5554 SourceLocation LParenLoc;
5560 SourceLocation KindLoc;
5563 SourceLocation CommaLoc;
5566 Expr *ChunkSize =
nullptr;
5576 void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
5581 void setDistScheduleKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
5586 void setCommaLoc(SourceLocation Loc) { CommaLoc = Loc; }
5591 void setChunkSize(Expr *E) { ChunkSize = E; }
5606 SourceLocation KLoc, SourceLocation CommaLoc,
5607 SourceLocation EndLoc,
5609 Stmt *HelperChunkSize)
5610 :
OMPClause(OMPC_dist_schedule, StartLoc, EndLoc),
5611 OMPClauseWithPreInit(this), LParenLoc(LParenLoc), Kind(Kind),
5612 KindLoc(KLoc), CommaLoc(CommaLoc), ChunkSize(ChunkSize) {
5613 setPreInitStmt(HelperChunkSize);
5618 :
OMPClause(OMPC_dist_schedule, SourceLocation(), SourceLocation()),
5619 OMPClauseWithPreInit(this) {}
5640 return child_range(reinterpret_cast<Stmt **>(&ChunkSize),
5641 reinterpret_cast<Stmt **>(&ChunkSize) + 1);
5657 return T->getClauseKind() == OMPC_dist_schedule;
5672 SourceLocation LParenLoc;
5684 SourceLocation KindLoc;
5699 void setDefaultmapModifierLoc(SourceLocation Loc) {
5706 void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
5711 void setDefaultmapKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
5724 SourceLocation MLoc, SourceLocation KLoc,
5727 :
OMPClause(OMPC_defaultmap, StartLoc, EndLoc), LParenLoc(LParenLoc),
5728 Modifier(M), ModifierLoc(MLoc), Kind(Kind), KindLoc(KLoc) {}
5732 :
OMPClause(OMPC_defaultmap, SourceLocation(), SourceLocation()) {}
5769 return T->getClauseKind() == OMPC_defaultmap;
5783 OMPToClause, Expr *, ValueDecl *, unsigned,
5784 OMPClauseMappableExprCommon::MappableComponent> {
5803 explicit OMPToClause(NestedNameSpecifierLoc MapperQualifierLoc,
5804 DeclarationNameInfo MapperIdInfo,
5805 const OMPVarListLocTy &Locs,
5822 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
5825 return 2 * varlist_size();
5827 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
5828 return getUniqueDeclarationsNum();
5830 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
5831 return getUniqueDeclarationsNum() + getTotalComponentListNum();
5850 ArrayRef<Expr *> Vars,
5851 ArrayRef<ValueDecl *> Declarations,
5853 ArrayRef<Expr *> UDMapperRefs,
5854 NestedNameSpecifierLoc UDMQualifierLoc,
5855 DeclarationNameInfo MapperId);
5869 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
5870 reinterpret_cast<Stmt **>(varlist_end()));
5886 return T->getClauseKind() == OMPC_to;
5901 OMPFromClause, Expr *, ValueDecl *, unsigned,
5902 OMPClauseMappableExprCommon::MappableComponent> {
5921 explicit OMPFromClause(NestedNameSpecifierLoc MapperQualifierLoc,
5922 DeclarationNameInfo MapperIdInfo,
5923 const OMPVarListLocTy &Locs,
5940 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
5943 return 2 * varlist_size();
5945 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
5946 return getUniqueDeclarationsNum();
5948 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
5949 return getUniqueDeclarationsNum() + getTotalComponentListNum();
5968 ArrayRef<Expr *> Vars,
5969 ArrayRef<ValueDecl *> Declarations,
5971 ArrayRef<Expr *> UDMapperRefs,
5972 NestedNameSpecifierLoc UDMQualifierLoc,
5973 DeclarationNameInfo MapperId);
5987 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
5988 reinterpret_cast<Stmt **>(varlist_end()));
6004 return T->getClauseKind() == OMPC_from;
6019 OMPUseDevicePtrClause, Expr *, ValueDecl *, unsigned,
6020 OMPClauseMappableExprCommon::MappableComponent> {
6053 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
6054 return 3 * varlist_size();
6056 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
6057 return getUniqueDeclarationsNum();
6059 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
6060 return getUniqueDeclarationsNum() + getTotalComponentListNum();
6066 void setPrivateCopies(ArrayRef<Expr *> VL);
6070 MutableArrayRef<Expr *> getPrivateCopies() {
6071 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
6073 ArrayRef<const Expr *> getPrivateCopies()
const {
6074 return llvm::makeArrayRef(varlist_end(), varlist_size());
6080 void setInits(ArrayRef<Expr *> VL);
6084 MutableArrayRef<Expr *>
getInits() {
6085 return MutableArrayRef<Expr *>(getPrivateCopies().end(), varlist_size());
6087 ArrayRef<const Expr *>
getInits()
const {
6088 return llvm::makeArrayRef(getPrivateCopies().end(), varlist_size());
6104 Create(
const ASTContext &
C,
const OMPVarListLocTy &Locs,
6105 ArrayRef<Expr *> Vars, ArrayRef<Expr *> PrivateVars,
6106 ArrayRef<Expr *>
Inits, ArrayRef<ValueDecl *> Declarations,
6124 llvm::iterator_range<private_copies_const_iterator>;
6128 getPrivateCopies().end());
6133 getPrivateCopies().end());
6150 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
6151 reinterpret_cast<Stmt **>(varlist_end()));
6167 return T->getClauseKind() == OMPC_use_device_ptr;
6182 OMPIsDevicePtrClause, Expr *, ValueDecl *, unsigned,
6183 OMPClauseMappableExprCommon::MappableComponent> {
6216 size_t numTrailingObjects(OverloadToken<Expr *>)
const {
6217 return varlist_size();
6219 size_t numTrailingObjects(OverloadToken<ValueDecl *>)
const {
6220 return getUniqueDeclarationsNum();
6222 size_t numTrailingObjects(OverloadToken<unsigned>)
const {
6223 return getUniqueDeclarationsNum() + getTotalComponentListNum();
6237 Create(
const ASTContext &
C,
const OMPVarListLocTy &Locs,
6238 ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
6253 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
6254 reinterpret_cast<Stmt **>(varlist_end()));
6270 return T->getClauseKind() == OMPC_is_device_ptr;
6295 SourceLocation EndLoc,
unsigned N)
6297 LParenLoc, EndLoc, N) {}
6304 OMPC_nontemporal, SourceLocation(), SourceLocation(),
6305 SourceLocation(), N) {}
6309 MutableArrayRef<Expr *> getPrivateRefs() {
6310 return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
6312 ArrayRef<const Expr *> getPrivateRefs()
const {
6313 return llvm::makeArrayRef(varlist_end(), varlist_size());
6325 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
6326 SourceLocation EndLoc, ArrayRef<Expr *> VL);
6336 void setPrivateRefs(ArrayRef<Expr *> VL);
6339 return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
6340 reinterpret_cast<Stmt **>(varlist_end()));
6349 return child_range(reinterpret_cast<Stmt **>(getPrivateRefs().begin()),
6350 reinterpret_cast<Stmt **>(getPrivateRefs().end()));
6366 return T->getClauseKind() == OMPC_nontemporal;
6372 template<
class ImplClass,
template <
typename>
class Ptr,
typename RetTy>
6375 #define PTR(CLASS) typename Ptr<CLASS>::type 6376 #define DISPATCH(CLASS) \ 6377 return static_cast<ImplClass*>(this)->Visit##CLASS(static_cast<PTR(CLASS)>(S)) 6379 #define OPENMP_CLAUSE(Name, Class) \ 6380 RetTy Visit ## Class (PTR(Class) S) { DISPATCH(Class); } 6381 #include "clang/Basic/OpenMPKinds.def" 6385 switch (S->getClauseKind()) {
6386 default: llvm_unreachable(
"Unknown clause kind!");
6387 #define OPENMP_CLAUSE(Name, Class) \ 6388 case OMPC_ ## Name : return Visit ## Class(static_cast<PTR(Class)>(S)); 6389 #include "clang/Basic/OpenMPKinds.def" 6398 template <
typename T>
6401 template<
class ImplClass,
typename RetTy =
void>
6404 template<
class ImplClass,
typename RetTy =
void>
6410 const PrintingPolicy &Policy;
6413 template <
typename T>
void VisitOMPClauseList(T *
Node,
char StartSym);
6417 : OS(OS), Policy(Policy) {}
6419 #define OPENMP_CLAUSE(Name, Class) void Visit##Class(Class *S); 6420 #include "clang/Basic/OpenMPKinds.def" 6425 #endif // LLVM_CLANG_AST_OPENMPCLAUSE_H const_child_range children() const
ArrayRef< const Expr *>::iterator mapperlist_const_iterator
OMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'capture' clause.
OMPNumTeamsClause(Expr *E, Stmt *HelperE, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_teams' clause.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
helper_expr_range source_exprs()
child_range used_children()
OMPHintClause()
Build an empty clause.
const_child_range used_children() const
llvm::iterator_range< helper_expr_iterator > helper_expr_range
static const Decl * getCanonicalDecl(const Decl *D)
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
OMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'untied' clause.
helper_expr_const_range reduction_ops() const
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
typename std::add_pointer< typename std::add_const< T >::type > const_ptr
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Iterator that browse the components by lists.
OMPSeqCstClause()
Build an empty clause.
const_child_range children() const
const_child_range used_children() const
helper_expr_const_range lhs_exprs() const
const_all_decls_range all_decls() const
This represents clause 'copyin' in the '#pragma omp ...' directives.
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
helper_expr_range source_exprs()
bool varlist_empty() const
child_range used_children()
const Expr * getChunkSize() const
Get chunk size.
child_range used_children()
llvm::omp::ProcBindKind getProcBindKind() const
Returns kind of the clause.
const_child_range used_children() const
MutableArrayRef< Expr * >::iterator updates_iterator
static bool classof(const OMPClause *T)
SourceLocation getCommaLoc()
Get location of ','.
const_child_range children() const
helper_expr_range privates()
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
helper_expr_const_range rhs_exprs() const
const_child_range used_children() const
llvm::iterator_range< inits_iterator > inits_range
const_component_lists_iterator(ArrayRef< ValueDecl *> UniqueDecls, ArrayRef< unsigned > DeclsListNum, ArrayRef< unsigned > CumulativeListSizes, MappableExprComponentListRef Components)
Construct an iterator that scans all lists.
private_copies_range private_copies()
void setUniqueDecls(ArrayRef< ValueDecl *> UDs)
Set the unique declarations that are in the trailing objects of the class.
Stmt - This represents one statement.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
static bool classof(const OMPClause *T)
OMPNumTasksClause(Expr *Size, Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_tasks' clause.
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
llvm::iterator_range< inits_iterator > inits_range
child_range used_children()
static bool classof(const OMPClause *T)
helper_expr_range rhs_exprs()
OMPUpdateClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'update' clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getAllocator() const
Returns allocator.
helper_expr_const_range rhs_exprs() const
This represents 'grainsize' clause in the '#pragma omp ...' directive.
child_range used_children()
static bool classof(const OMPClause *T)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
child_range used_children()
const_child_range children() const
This represents 'if' clause in the '#pragma omp ...' directive.
const_child_range private_refs() const
const_child_range used_children() const
SourceLocation getAtomicDefaultMemOrderKindKwLoc() const
Returns location of clause kind.
OMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'unified_address' clause.
helper_expr_const_range assignment_ops() const
This class implements a simple visitor for OMPClause subclasses.
OMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'simd' clause.
const_child_range children() const
This represents 'priority' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
helper_expr_const_range lhs_exprs() const
MutableArrayRef< Expr * > getUsedExprs()
Gets the list of used expressions for linear variables.
llvm::iterator_range< private_copies_iterator > private_copies_range
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPAllocatorClause()
Build an empty clause.
Expr * getCondition() const
Returns condition.
This represents 'update' clause in the '#pragma omp atomic' directive.
OMPAtomicDefaultMemOrderClause()
Build an empty clause.
void setComponents(ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
Set the components that are in the trailing objects of the class.
ArrayRef< const Expr * >::iterator private_copies_const_iterator
Expr * getCondition() const
Returns condition.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
MutableArrayRef< Expr * >::iterator used_expressions_iterator
MutableArrayRef< Expr * >::iterator helper_expr_iterator
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
child_range used_children()
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Expr * getAlignment()
Returns alignment.
child_range used_children()
const_child_range children() const
Expr * getNumForLoops() const
Return the number of associated for-loops.
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
const_child_range children() const
OpenMPMapModifierKind getMapTypeModifier(unsigned Cnt) const LLVM_READONLY
Fetches the map-type-modifier at 'Cnt' index of array of modifiers.
const_child_range used_children() const
helper_expr_range rhs_exprs()
ArrayRef< MappableComponent > getComponentsRef() const
Get the components that are in the trailing objects of the class.
const_child_range children() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static bool classof(const OMPClause *T)
SourceLocation getDependencyLoc() const
Get dependency type location.
This represents 'read' clause in the '#pragma omp atomic' directive.
helper_expr_const_range assignment_ops() const
OMPFinalClause()
Build an empty clause.
OMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'atomic_default_mem_order' clause with argument A ('seq_cst', 'acq_rel' or 'relaxed').
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)
const_child_range children() const
const_child_range children() const
This represents 'num_threads' clause in the '#pragma omp ...' directive.
const_child_range used_children() const
const_child_range used_children() const
bool This(InterpState &S, CodePtr OpPC)
llvm::iterator_range< const_all_num_lists_iterator > const_all_num_lists_range
const_child_range children() const
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
const_child_range used_children() const
This represents clauses with a list of expressions that are mappable.
llvm::iterator_range< const_all_components_iterator > const_all_components_range
void setUpdates(ArrayRef< Expr *> UL)
Sets the list of update expressions for linear variables.
StmtIterator child_iterator
SourceLocation getColonLoc() const
Return the location of ':'.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
const_child_range children() const
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
private_copies_const_range private_copies() const
static bool classof(const OMPClause *T)
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
This represents 'reverse_offload' clause in the '#pragma omp requires' directive. ...
OMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'nogroup' clause.
child_range used_children()
const_child_range used_children() const
child_range used_children()
Struct that defines common infrastructure to handle mappable expressions used in OpenMP clauses...
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getGrainsize() const
Return safe iteration space distance.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
This represents 'allocator' clause in the '#pragma omp ...' directive.
This represents 'safelen' clause in the '#pragma omp ...' directive.
const_child_range used_children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
MutableArrayRef< Expr * >::iterator inits_iterator
const_child_range children() const
OpenMPMapModifierKind
OpenMP modifier kind for 'map' clause.
static bool classof(const OMPClause *T)
OMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'hint' clause with expression Hint.
unsigned varlist_size() const
llvm::iterator_range< private_copies_iterator > private_copies_range
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.
SourceLocation getLParenLoc() const
Returns the location of '('.
child_range used_children()
child_range used_children()
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
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.
SourceLocation getColonLoc() const
Returns the location of ':'.
This represents 'simd' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
llvm::iterator_range< updates_iterator > updates_range
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
MutableArrayRef< Expr *>::iterator varlist_iterator
Expr * getAssociatedExpression() const
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.
This represents clause 'allocate' in the '#pragma omp ...' directives.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
child_range used_children()
OMPVarListClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
Build a clause with N variables.
SourceLocation getLParenLoc() const
Returns the location of '('.
helper_expr_range privates()
RetTy Visit(PTR(OMPClause) S)
varlist_iterator varlist_begin()
ArrayRef< const Expr * >::iterator private_copies_const_iterator
const_child_range children() const
Expr * getChunkSize()
Get chunk size.
This represents clause 'map' in the '#pragma omp ...' directives.
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
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 ':'.
child_range used_children()
Defines some OpenMP-specific enums and functions.
Expr * getSafelen() const
Return safe iteration space distance.
OMPPriorityClause()
Build an empty clause.
child_range used_children()
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
helper_expr_range lhs_exprs()
Expr * getNumTeams()
Return NumTeams number.
llvm::iterator_range< helper_expr_iterator > helper_expr_range
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
child_range used_children()
child_range used_children()
const_child_range used_children() const
OMPDefaultmapClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KLoc, SourceLocation EndLoc, OpenMPDefaultmapClauseKind Kind, OpenMPDefaultmapClauseModifier M)
Build 'defaultmap' clause with defaultmap kind Kind.
MutableArrayRef< Expr * >::iterator private_copies_iterator
MutableArrayRef< unsigned > getComponentListSizesRef()
Get the cumulative component lists sizes that are in the trailing objects of the class.
const_child_range children() const
MutableArrayRef< Expr * >::iterator helper_expr_iterator
const_child_range used_children() const
const_child_range children() const
OMPSafelenClause()
Build an empty clause.
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
child_range used_children()
ArrayRef< SourceLocation > getMapTypeModifiersLoc() const LLVM_READONLY
Fetches ArrayRef of location of map-type-modifiers.
const_child_range used_children() const
const_child_range children() const
void setModifierLoc(SourceLocation Loc)
Set modifier location.
void setCalcStep(Expr *CalcStep)
Sets the expression to calculate linear step for clause.
helper_expr_range destination_exprs()
const_child_range used_children() const
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
child_range used_children()
const_child_range children() const
child_range used_children()
helper_expr_range privates()
const_child_range children() const
child_range used_children()
SourceLocation getDefaultmapKindLoc()
Get kind location.
MutableArrayRef< Expr * >::iterator private_copies_iterator
const_child_range children() const
const_child_range used_children() const
const_child_range children() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const_child_range children() const
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
ValueDecl * getAssociatedDeclaration() const
static bool classof(const OMPClause *T)
mapperlist_const_range mapperlists() const
ArrayRef< Expr * > getUDMapperRefs() const
Get the user-defined mappers references that are in the trailing objects of the class.
OMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'unified_shared_memory' clause.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
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.
SourceLocation getMapTypeModifierLoc(unsigned Cnt) const LLVM_READONLY
Fetches the map-type-modifier location at 'Cnt' index of array of modifiers' locations.
static bool classof(const OMPClause *T)
const_child_range children() const
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.
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc...
SmallVector< MappableComponent, 8 > MappableExprComponentList
helper_expr_range lhs_exprs()
This represents 'default' clause in the '#pragma omp ...' directive.
OMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'write' clause.
Expr * getPriority() const
Return Priority number.
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
const_component_lists_iterator decl_component_lists_begin(const ValueDecl *VD) const
Iterators for component lists associated with the provided declaration.
ArrayRef< MappableComponent > MappableExprComponentListRef
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
MutableArrayRef< Expr * >::iterator helper_expr_iterator
This represents clause 'reduction' in the '#pragma omp ...' directives.
const_child_range used_children() const
void setPrivates(ArrayRef< Expr *> PL)
Sets the list of the copies of original linear variables.
OMPNogroupClause()
Build an empty clause.
child_range used_children()
child_range used_children()
const_child_range children() const
child_range used_children()
child_range used_children()
const_component_lists_range decl_component_lists(const ValueDecl *VD) const
const_child_range used_children() const
SourceLocation getDefaultmapModifierLoc() const
Get the modifier location.
ArrayRef< const Expr * >::iterator private_copies_const_iterator
helper_expr_const_range source_exprs() const
child_range used_children()
unsigned NumVars
Number of expressions listed.
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.
child_range used_children()
Get the iterator range for the expressions used in the clauses.
MutableArrayRef< Expr * >::iterator helper_expr_iterator
used_expressions_range used_expressions()
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Expr * getPostUpdateExpr()
Get post-update expression for the clause.
Expr * getDevice() const
Return device number.
RetTy VisitOMPClause(PTR(OMPClause) Node)
helper_expr_const_range source_exprs() const
void setFinals(ArrayRef< Expr *> FL)
Sets the list of final update expressions for linear variables.
static bool classof(const OMPClause *T)
llvm::iterator_range< helper_expr_iterator > helper_expr_range
llvm::iterator_range< used_expressions_iterator > used_expressions_range
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
OMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'seq_cst' clause.
void setModifier(OpenMPLinearClauseKind Kind)
Set modifier.
helper_expr_const_range privates() const
private_copies_range private_copies()
This represents clause 'from' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
child_range used_children()
OMPScheduleClause()
Build an empty clause.
child_range used_children()
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
helper_expr_const_range reduction_ops() const
OMPCollapseClause(Expr *Num, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'collapse' clause.
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
const_child_range children() const
static bool classof(const OMPClause *)
OMPDistScheduleClause()
Build an empty clause.
static bool classof(const OMPClause *T)
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
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.
NestedNameSpecifierLoc getMapperQualifierLoc() const
Gets the nested name specifier for associated user-defined mapper.
const_child_range children() const
helper_expr_const_range destination_exprs() const
Expr * getSimdlen() const
Return safe iteration space distance.
friend class OMPClauseReader
OMPMappableExprListClause(OpenMPClauseKind K, const OMPVarListLocTy &Locs, const OMPMappableExprListSizeTy &Sizes, NestedNameSpecifierLoc *MapperQualifierLocPtr=nullptr, DeclarationNameInfo *MapperIdInfoPtr=nullptr)
Build a clause for NumUniqueDeclarations declarations, NumComponentLists total component lists...
helper_expr_range assignment_ops()
helper_expr_const_range source_exprs() const
OMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'nowait' clause.
This represents clause 'aligned' in the '#pragma omp ...' directives.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
static bool classof(const OMPClause *T)
mapperlist_iterator mapperlist_begin()
void setLocEnd(SourceLocation Loc)
Sets the ending location of the clause.
OMPWriteClause()
Build an empty clause.
llvm::iterator_range< mapperlist_const_iterator > mapperlist_const_range
static bool classof(const OMPClause *T)
OMPCaptureClause()
Build an empty clause.
helper_expr_const_range private_copies() const
static bool classof(const OMPClause *T)
OMPSafelenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'safelen' clause.
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
helper_expr_range assignment_ops()
helper_expr_const_range destination_exprs() const
const_child_range children() const
SourceLocation getLParenLoc() const
Returns the locaiton of '('.
llvm::iterator_range< inits_const_iterator > inits_const_range
unsigned getNumLoops() const
Get number of loops associated with the clause.
std::pair< const ValueDecl *, MappableExprComponentListRef > operator->() const
const_child_range children() const
This represents implicit clause 'depend' for the '#pragma omp task' directive.
Expr * getStep()
Returns linear step.
const_all_num_lists_range all_num_lists() const
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
ArrayRef< unsigned >::iterator const_all_lists_sizes_iterator
child_range used_children()
llvm::iterator_range< inits_iterator > inits_range
OpenMPLastprivateModifier getKind() const
Lastprivate kind.
const_child_range used_children() const
child_range used_children()
child_range used_children()
const_child_range used_children() const
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
const_child_range children() const
This represents one expression.
const_component_lists_iterator decl_component_lists_end() const
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
OMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Build 'if' clause with condition Cond.
ArrayRef< const Expr * >::iterator used_expressions_const_iterator
child_range used_children()
This represents 'simdlen' clause in the '#pragma omp ...' directive.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
Expr * getNumTasks() const
Return safe iteration space distance.
unsigned NumComponentLists
Number of component lists.
SourceLocation getScheduleKindLoc()
Get kind location.
static bool classof(const OMPClause *T)
MutableArrayRef< Expr * > getVarRefs()
Fetches list of variables associated with this clause.
varlist_const_iterator varlist_end() const
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'dynamic_allocators' clause.
static bool classof(const OMPClause *T)
MutableArrayRef< Expr * >::iterator inits_iterator
const_child_range children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getAllocator() const
Returns the allocator expression or nullptr, if no allocator is specified.
OpenMPClauseKind
OpenMP clauses.
static bool classof(const OMPClause *T)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
const_child_range used_children() const
const_child_range used_children() const
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
static bool classof(const OMPClause *T)
helper_expr_const_range rhs_exprs() const
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.
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_child_range used_children() const
const_child_range used_children() const
const_child_range used_children() const
const_child_range children() const
SourceLocation getColonLoc() const
Get colon location.
const_component_lists_range component_lists() const
static bool classof(const OMPClause *T)
void setMapperIdInfo(DeclarationNameInfo MapperId)
Set the name of associated user-defined mapper.
static bool classof(const OMPClause *T)
const_child_range used_children() const
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)
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
llvm::iterator_range< helper_expr_iterator > helper_expr_range
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
child_range used_children()
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Expr * getDevice()
Return device number.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
inits_const_range inits() const
SourceLocation getCommaLoc()
Get location of ','.
const_child_range used_children() const
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
static bool classof(const OMPClause *T)
const_child_range children() const
MutableArrayRef< Expr * >::iterator inits_iterator
const_child_range children() const
OMPThreadLimitClause()
Build an empty clause.
helper_expr_range destination_exprs()
const_child_range children() const
void setPreInitStmt(Stmt *S, OpenMPDirectiveKind ThisRegion=llvm::omp::OMPD_unknown)
Set pre-initialization statement for the clause.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
helper_expr_const_range assignment_ops() const
This represents 'untied' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
helper_expr_range lhs_exprs()
mapperlist_range mapperlists()
helper_expr_range reduction_ops()
static bool classof(const OMPClause *T)
SourceLocation getModifierLoc() const
Return modifier location.
OMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'mergeable' clause.
OMPNumThreadsClause(Expr *NumThreads, Stmt *HelperNumThreads, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_threads' clause with condition NumThreads.
static bool classof(const OMPClause *T)
static bool classof(const OMPClause *T)
This represents 'unified_address' clause in the '#pragma omp requires' directive. ...
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
SourceLocation getLParenLoc()
Get location of '('.
helper_expr_range destination_exprs()
SourceLocation getColonLoc() const
Returns the location of ':'.
const_child_range children() const
This represents 'num_teams' clause in the '#pragma omp ...' directive.
OMPPriorityClause(Expr *Priority, Stmt *HelperPriority, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'priority' clause.
OMPSimdlenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'simdlen' clause.
llvm::iterator_range< child_iterator > child_range
SourceLocation LParenLoc
Location of '('.
SourceLocation getLParenLoc()
Get location of '('.
const_child_range children() const
MappableComponent(Expr *AssociatedExpression, ValueDecl *AssociatedDeclaration)
helper_expr_const_range taskgroup_descriptors() const
helper_expr_range private_copies()
const Expr * getChunkSize() const
Get chunk size.
OMPCollapseClause()
Build an empty clause.
llvm::iterator_range< updates_const_iterator > updates_const_range
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
ArrayRef< unsigned > getDeclNumListsRef() const
Get the number of lists per declaration that are in the trailing objects of the class.
static bool classof(const OMPClause *T)
OMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'threads' clause.
Encodes a location in the source.
mapperlist_iterator mapperlist_end()
Expr * getNumTeams() const
Return NumTeams number.
const_child_range used_children() const
This represents 'hint' clause in the '#pragma omp ...' directive.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
MutableArrayRef< Expr * > getInits()
varlist_const_iterator varlist_begin() const
const_child_range used_children() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
helper_expr_range rhs_exprs()
child_range used_children()
const_child_range used_children() const
llvm::iterator_range< const_all_lists_sizes_iterator > const_all_lists_sizes_range
private_copies_range private_copies()
ArrayRef< const Expr * >::iterator updates_const_iterator
This structure contains all sizes needed for by an OMPMappableExprListClause.
const_child_range used_children() const
This represents 'schedule' clause in the '#pragma omp ...' directive.
llvm::iterator_range< finals_const_iterator > finals_const_range
MutableArrayRef< Expr * >::iterator privates_iterator
OMPMergeableClause()
Build an empty clause.
OMPClausePrinter(raw_ostream &OS, const PrintingPolicy &Policy)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPDynamicAllocatorsClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
This represents clause 'shared' in the '#pragma omp ...' directives.
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
const_child_range children() const
OMPNumTeamsClause()
Build an empty clause.
llvm::iterator_range< const_child_iterator > const_child_range
static bool classof(const OMPClause *T)
Expr * getPriority()
Return Priority number.
void setMapperQualifierLoc(NestedNameSpecifierLoc NNSL)
Set the nested name specifier of associated user-defined mapper.
const_child_range used_children() const
OMPVarListLocTy(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
ArrayRef< ValueDecl * > getUniqueDeclsRef() const
Get the unique declarations that are in the trailing objects of the class.
OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
const_child_range children() const
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
static bool classof(const OMPClause *T)
const_child_range children() const
child_range used_children()
const_component_lists_iterator & operator++()
SourceLocation getKindLoc() const
Returns the location of the lastprivate kind.
This is a basic class for representing single OpenMP clause.
const_child_range children() const
const_child_range children() const
child_range used_children()
SourceLocation getColonLoc() const
Returns the location of the ':' delimiter.
MutableArrayRef< Expr * >::iterator helper_expr_iterator
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
child_range used_children()
MutableArrayRef< Expr * >::iterator finals_iterator
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
void setVarRefs(ArrayRef< Expr *> VL)
Sets the list of variables for this clause.
OMPUnifiedSharedMemoryClause()
Build an empty clause.
static bool classof(const OMPClause *T)
ArrayRef< MappableComponent >::iterator const_all_components_iterator
const_child_range used_children() const
SourceLocation EndLoc
Ending location of the clause.
ConstStmtIterator const_child_iterator
SourceLocation getColonLoc() const
Returns the location of the ':' symbol, if any.
Expr * getNumForLoops() const
Return the number of associated for-loops.
const_child_range used_children() const
const_all_lists_sizes_range all_lists_sizes() const
helper_expr_range reduction_ops()
static bool classof(const OMPClause *T)
std::pair< const ValueDecl *, MappableExprComponentListRef > operator*() const
MutableArrayRef< Expr * >::iterator helper_expr_iterator
llvm::iterator_range< used_expressions_const_iterator > used_expressions_const_range
SourceLocation getLParenLoc() const
Returns the location of '('.
helper_expr_const_range lhs_exprs() const
child_range used_children()
const_child_range used_children() const
ArrayRef< unsigned >::iterator const_all_num_lists_iterator
llvm::iterator_range< inits_const_iterator > inits_const_range
ArrayRef< const Expr * >::iterator inits_const_iterator
OpenMPDirectiveKind getCaptureRegion() const
Get capture region for the stmt in the clause.
OMPDefaultmapClause()
Build an empty clause.
const_component_lists_iterator component_lists_begin() const
Iterators for all component lists.
void setStep(Expr *Step)
Sets the linear step for clause.
ast_type_traits::DynTypedNode Node
ArrayRef< OpenMPMapModifierKind > getMapTypeModifiers() const LLVM_READONLY
Fetches ArrayRef of map-type-modifiers.
llvm::iterator_range< const_all_decls_iterator > const_all_decls_range
Optional< types::ID > Type
const_child_range used_children() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
llvm::iterator_range< varlist_const_iterator > varlist_const_range
Dataflow Directional Tag Classes.
ArrayRef< const Expr * > getVarRefs() const
Fetches list of all variables in the clause.
SourceLocation getColonLoc() const
Get colon location.
This represents 'device' clause in the '#pragma omp ...' directive.
const Expr * getAlignment() const
Returns alignment.
OMPThreadsClause()
Build an empty clause.
OpenMPDefaultmapClauseKind getDefaultmapKind() const
Get kind of the clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
SourceLocation ModifierLoc
Location of linear modifier if any.
helper_expr_const_range privates() const
static bool classof(const OMPClause *T)
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
static bool classof(const OMPClause *T)
const_all_components_range all_components() const
const_child_range children() const
child_range used_children()
child_range used_children()
OMPNumThreadsClause()
Build an empty clause.
MutableArrayRef< ValueDecl * > getUniqueDeclsRef()
Get the unique declarations that are in the trailing objects of the class.
SourceLocation getLParenLoc()
Get location of '('.
Stmt * getPreInitStmt()
Get pre-initialization statement for the clause.
U cast(CodeGen::Address addr)
static bool classof(const OMPClause *T)
child_range used_children()
static bool classof(const OMPClause *T)
This represents 'unified_shared_memory' clause in the '#pragma omp requires' directive.
This represents clause 'linear' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
ArrayRef< const Expr * >::iterator inits_const_iterator
const_child_range used_children() const
const_child_range children() const
static bool classof(const OMPClause *T)
const_child_range used_children() const
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
OpenMPDefaultmapClauseModifier getDefaultmapModifier() const
Get the modifier of the clause.
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
ArrayRef< MappableExprComponentList > MappableExprComponentListsRef
const_child_range children() const
child_range used_children()
unsigned NumUniqueDeclarations
Number of unique base declarations.
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
SmallVector< MappableExprComponentList, 8 > MappableExprComponentLists
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< private_copies_iterator > private_copies_range
const_child_range children() const
MutableArrayRef< Expr * >::iterator private_copies_iterator
child_range used_children()
ArrayRef< unsigned > getComponentListSizesRef() const
Get the cumulative component lists sizes that are in the trailing objects of the class.
SourceLocation getEndLoc() const
Returns the ending location of the clause.
void setComponentListSizes(ArrayRef< unsigned > CLSs)
Set the cumulative component lists sizes that are in the trailing objects of the class.
helper_expr_const_range privates() const
llvm::iterator_range< mapperlist_iterator > mapperlist_range
Class that represents a component of a mappable expression.
ArrayRef< const Expr * >::iterator inits_const_iterator
private_copies_const_range private_copies() const
inits_const_range inits() const
child_range used_children()
OMPDefaultClause(OpenMPDefaultClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'default' clause with argument A ('none' or 'shared').
OMPDeviceClause(Expr *E, Stmt *HelperE, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'device' clause.
OMPReadClause()
Build an empty clause.
OMPThreadLimitClause(Expr *E, Stmt *HelperE, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'thread_limit' clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
mapperlist_const_iterator mapperlist_begin() const
const_child_range children() const
const_child_range used_children() const
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
llvm::iterator_range< privates_const_iterator > privates_const_range
const_child_range used_children() const
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
const_component_lists_iterator component_lists_end() const
helper_expr_const_range destination_exprs() const
llvm::iterator_range< const_component_lists_iterator > const_component_lists_range
ArrayRef< const Expr * >::iterator finals_const_iterator
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
OMPUntiedClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
const_child_range children() const
void setUDMapperRefs(ArrayRef< Expr *> DMDs)
Set the user-defined mappers that are in the trailing objects of the class.
const_child_range used_children() const
const_child_range used_children() const
private_copies_const_range private_copies() const
child_range private_refs()
OpenMPDefaultClauseKind
OpenMP attributes for 'default' clause.
OMPDeviceClause()
Build an empty clause.
llvm::iterator_range< inits_const_iterator > inits_const_range
SourceLocation getDistScheduleKindLoc()
Get kind location.
llvm::iterator_range< finals_iterator > finals_range
OMPNowaitClause()
Build an empty clause.
privates_range privates()
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
const_child_range children() const
This represents 'write' clause in the '#pragma omp atomic' directive.
const_child_range used_children() const
OMPNumTasksClause()
Build an empty clause.
helper_expr_range taskgroup_descriptors()
SourceLocation getLParenLoc() const
Returns the location of '('.
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)
const_child_range used_children() const
const_child_range used_children() const
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
ArrayRef< ValueDecl *>::iterator const_all_decls_iterator
Iterators to access all the declarations, number of lists, list sizes, and components.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
child_range used_children()
Defines the clang::SourceLocation class and associated facilities.
llvm::iterator_range< privates_iterator > privates_range
OMPUnifiedAddressClause()
Build an empty clause.
This represents 'nowait' clause in the '#pragma omp ...' directive.
MutableArrayRef< MappableComponent > getComponentsRef()
Get the components that are in the trailing objects of the class.
helper_expr_range reduction_ops()
varlist_iterator varlist_end()
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
const_child_range children() const
const_child_range used_children() const
child_range used_children()
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
varlist_const_range varlists() const
const_child_range used_children() const
Privates[]
Gets the list of initial values for linear variables.
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
const_child_range used_children() const
const_child_range used_children() const
child_range used_children()
OpenMPLinearClauseKind getModifier() const
Return modifier.
SourceLocation getFirstScheduleModifierLoc() const
Get the first modifier location.
OMPClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
OMPFinalClause(Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'final' clause with condition Cond.
const_child_range used_children() const
const_child_range used_children() const
helper_expr_const_range reduction_ops() const
MutableArrayRef< Expr *>::iterator mapperlist_iterator
const_child_range children() const
OMPProcBindClause(llvm::omp::ProcBindKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'proc_bind' clause with argument A ('master', 'close' or 'spread').
OMPSimdlenClause()
Build an empty clause.
const_child_range children() const
Expr * getThreadLimit()
Return ThreadLimit number.
child_range used_children()
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.
ArrayRef< const Expr * >::iterator privates_const_iterator
OMPUpdateClause()
Build an empty clause.
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
mapperlist_const_iterator mapperlist_end() const
ArrayRef< const Expr *>::iterator varlist_const_iterator
MutableArrayRef< Expr * > getUDMapperRefs()
Get the user-defined mapper references that are in the trailing objects of the class.
const_child_range used_children() const
Expr * getHint() const
Returns number of threads.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
void setInits(ArrayRef< Expr *> IL)
Sets the list of the initial values for linear variables.
OMPGrainsizeClause()
Build an empty clause.
static bool classof(const OMPClause *T)
const_child_range children() const
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Expr * getChunkSize()
Get chunk size.
Expr * getNumThreads() const
Returns number of threads.
This structure contains most locations needed for by an OMPVarListClause.
static bool classof(const OMPClause *T)
OMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'read' clause.
OMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'reverse_offload' clause.
const_child_range children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPClauseWithPostUpdate(const OMPClause *This)
child_range used_children()
static bool classof(const OMPClause *T)
const_child_range used_children() const
OMPReverseOffloadClause()
Build an empty clause.
const_child_range children() const
OMPAllocatorClause(Expr *A, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'allocator' clause with the given allocator.
const Expr * getPostUpdateExpr() const
Get post-update expression for the clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
OpenMPAtomicDefaultMemOrderClauseKind getAtomicDefaultMemOrderKind() const
Returns kind of the clause.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
const_child_range used_children() const
OMPGrainsizeClause(Expr *Size, Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'grainsize' clause.
const DeclarationNameInfo & getMapperIdInfo() const
Gets the name info for associated user-defined mapper.
SourceLocation ColonLoc
Location of ':'.
unsigned NumComponents
Total number of expression components.
const_child_range children() const
This represents clause 'nontemporal' in the '#pragma omp ...' directives.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
llvm::iterator_range< varlist_iterator > varlist_range
OMPMappableExprListSizeTy(unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
const_child_range used_children() const
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
OMPDefaultClause()
Build an empty clause.
static bool classof(const OMPClause *T)
OMPClauseWithPreInit(const OMPClause *This)
Expr * getThreadLimit() const
Return ThreadLimit number.
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.
child_range used_children()
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
const_child_range children() const
static bool classof(const OMPClause *T)
SourceLocation StartLoc
Starting location of the clause (the clause keyword).
void setUsedExprs(ArrayRef< Expr *> UE)
Sets the list of used expressions for the linear clause.