24#include "llvm/ADT/FoldingSet.h"
30 llvm::FoldingSetNodeID &ID;
32 bool ProfileLambdaExpr;
35 StmtProfiler(llvm::FoldingSetNodeID &ID,
bool Canonical,
36 bool ProfileLambdaExpr)
37 : ID(ID), Canonical(Canonical), ProfileLambdaExpr(ProfileLambdaExpr) {}
39 virtual ~StmtProfiler() {}
41 void VisitStmt(
const Stmt *S);
46 void VisitStmtNoChildren(
const Stmt *S) {
52#define STMT(Node, Base) void Visit##Node(const Node *S);
53#include "clang/AST/StmtNodes.inc"
57 virtual void VisitDecl(
const Decl *D) = 0;
64 virtual void VisitName(
DeclarationName Name,
bool TreatAsDecl =
false) = 0;
86 class StmtProfilerWithPointers :
public StmtProfiler {
87 const ASTContext &Context;
90 StmtProfilerWithPointers(llvm::FoldingSetNodeID &ID,
91 const ASTContext &Context,
bool Canonical,
92 bool ProfileLambdaExpr)
93 : StmtProfiler(
ID, Canonical, ProfileLambdaExpr), Context(Context) {}
100 void VisitDecl(
const Decl *D)
override {
103 if (Canonical && D) {
104 if (
const NonTypeTemplateParmDecl *NTTP =
105 dyn_cast<NonTypeTemplateParmDecl>(D)) {
106 ID.AddInteger(NTTP->getDepth());
107 ID.AddInteger(NTTP->getIndex());
108 ID.AddBoolean(NTTP->isParameterPack());
117 VisitType(Context.getUnconstrainedType(NTTP->getType()));
121 if (
const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
132 VisitType(Parm->getType());
133 ID.AddInteger(Parm->getFunctionScopeDepth());
134 ID.AddInteger(Parm->getFunctionScopeIndex());
138 if (
const TemplateTypeParmDecl *TTP =
139 dyn_cast<TemplateTypeParmDecl>(D)) {
140 ID.AddInteger(TTP->getDepth());
141 ID.AddInteger(TTP->getIndex());
142 ID.AddBoolean(TTP->isParameterPack());
146 if (
const TemplateTemplateParmDecl *TTP =
147 dyn_cast<TemplateTemplateParmDecl>(D)) {
148 ID.AddInteger(TTP->getDepth());
149 ID.AddInteger(TTP->getIndex());
150 ID.AddBoolean(TTP->isParameterPack());
158 void VisitType(QualType
T)
override {
159 if (Canonical && !
T.isNull())
160 T = Context.getCanonicalType(
T);
162 ID.AddPointer(
T.getAsOpaquePtr());
165 void VisitName(DeclarationName Name,
bool )
override {
169 void VisitIdentifierInfo(
const IdentifierInfo *II)
override {
173 void VisitNestedNameSpecifier(NestedNameSpecifier NNS)
override {
181 Name = Context.getCanonicalTemplateName(Name);
187 class StmtProfilerWithoutPointers :
public StmtProfiler {
190 StmtProfilerWithoutPointers(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
196 if (SC == Stmt::UnresolvedLookupExprClass) {
199 ID.AddInteger(Stmt::DeclRefExprClass);
205 void VisitType(QualType
T)
override {
209 void VisitName(DeclarationName Name,
bool TreatAsDecl)
override {
215 Hash.AddDeclarationName(Name, TreatAsDecl);
217 void VisitIdentifierInfo(
const IdentifierInfo *II)
override {
220 Hash.AddIdentifierInfo(II);
223 void VisitDecl(
const Decl *D)
override {
230 Hash.AddTemplateName(Name);
232 void VisitNestedNameSpecifier(NestedNameSpecifier NNS)
override {
233 ID.AddBoolean(
bool(NNS));
235 Hash.AddNestedNameSpecifier(NNS);
240void StmtProfiler::VisitStmt(
const Stmt *S) {
241 assert(S &&
"Requires non-null Stmt pointer");
243 VisitStmtNoChildren(S);
245 for (
const Stmt *SubStmt : S->
children()) {
253void StmtProfiler::VisitDeclStmt(
const DeclStmt *S) {
255 for (
const auto *D : S->
decls())
259void StmtProfiler::VisitNullStmt(
const NullStmt *S) {
263void StmtProfiler::VisitCompoundStmt(
const CompoundStmt *S) {
267void StmtProfiler::VisitCaseStmt(
const CaseStmt *S) {
271void StmtProfiler::VisitDefaultStmt(
const DefaultStmt *S) {
275void StmtProfiler::VisitLabelStmt(
const LabelStmt *S) {
280void StmtProfiler::VisitAttributedStmt(
const AttributedStmt *S) {
285void StmtProfiler::VisitIfStmt(
const IfStmt *S) {
290void StmtProfiler::VisitSwitchStmt(
const SwitchStmt *S) {
295void StmtProfiler::VisitWhileStmt(
const WhileStmt *S) {
300void StmtProfiler::VisitDoStmt(
const DoStmt *S) {
304void StmtProfiler::VisitForStmt(
const ForStmt *S) {
308void StmtProfiler::VisitGotoStmt(
const GotoStmt *S) {
313void StmtProfiler::VisitIndirectGotoStmt(
const IndirectGotoStmt *S) {
317void StmtProfiler::VisitContinueStmt(
const ContinueStmt *S) {
321void StmtProfiler::VisitBreakStmt(
const BreakStmt *S) {
325void StmtProfiler::VisitReturnStmt(
const ReturnStmt *S) {
329void StmtProfiler::VisitDeferStmt(
const DeferStmt *S) { VisitStmt(S); }
331void StmtProfiler::VisitGCCAsmStmt(
const GCCAsmStmt *S) {
342 for (
unsigned I = 0, N = S->
getNumInputs(); I != N; ++I) {
350 for (
auto *L : S->
labels())
351 VisitDecl(L->getLabel());
354void StmtProfiler::VisitMSAsmStmt(
const MSAsmStmt *S) {
359void StmtProfiler::VisitCXXCatchStmt(
const CXXCatchStmt *S) {
364void StmtProfiler::VisitCXXTryStmt(
const CXXTryStmt *S) {
368void StmtProfiler::VisitCXXForRangeStmt(
const CXXForRangeStmt *S) {
372void StmtProfiler::VisitCXXExpansionStmtPattern(
373 const CXXExpansionStmtPattern *S) {
377void StmtProfiler::VisitCXXExpansionStmtInstantiation(
378 const CXXExpansionStmtInstantiation *S) {
383void StmtProfiler::VisitMSDependentExistsStmt(
const MSDependentExistsStmt *S) {
390void StmtProfiler::VisitSEHTryStmt(
const SEHTryStmt *S) {
394void StmtProfiler::VisitSEHFinallyStmt(
const SEHFinallyStmt *S) {
398void StmtProfiler::VisitSEHExceptStmt(
const SEHExceptStmt *S) {
402void StmtProfiler::VisitSEHLeaveStmt(
const SEHLeaveStmt *S) {
406void StmtProfiler::VisitCapturedStmt(
const CapturedStmt *S) {
410void StmtProfiler::VisitSYCLKernelCallStmt(
const SYCLKernelCallStmt *S) {
414void StmtProfiler::VisitObjCForCollectionStmt(
const ObjCForCollectionStmt *S) {
418void StmtProfiler::VisitObjCAtCatchStmt(
const ObjCAtCatchStmt *S) {
425void StmtProfiler::VisitObjCAtFinallyStmt(
const ObjCAtFinallyStmt *S) {
429void StmtProfiler::VisitObjCAtTryStmt(
const ObjCAtTryStmt *S) {
434StmtProfiler::VisitObjCAtSynchronizedStmt(
const ObjCAtSynchronizedStmt *S) {
438void StmtProfiler::VisitObjCAtThrowStmt(
const ObjCAtThrowStmt *S) {
443StmtProfiler::VisitObjCAutoreleasePoolStmt(
const ObjCAutoreleasePoolStmt *S) {
448class OMPClauseProfiler :
public ConstOMPClauseVisitor<OMPClauseProfiler> {
449 StmtProfiler *Profiler;
451 template <
typename T>
452 void VisitOMPClauseList(
T *Node);
455 OMPClauseProfiler(StmtProfiler *P) : Profiler(P) { }
456#define GEN_CLANG_CLAUSE_CLASS
457#define CLAUSE_CLASS(Enum, Str, Class) void Visit##Class(const Class *C);
458#include "llvm/Frontend/OpenMP/OMP.inc"
463void OMPClauseProfiler::VisitOMPClauseWithPreInit(
464 const OMPClauseWithPreInit *
C) {
465 if (
auto *S =
C->getPreInitStmt())
466 Profiler->VisitStmt(S);
469void OMPClauseProfiler::VisitOMPClauseWithPostUpdate(
470 const OMPClauseWithPostUpdate *
C) {
471 VisitOMPClauseWithPreInit(
C);
472 if (
auto *E =
C->getPostUpdateExpr())
473 Profiler->VisitStmt(E);
476void OMPClauseProfiler::VisitOMPIfClause(
const OMPIfClause *
C) {
477 VisitOMPClauseWithPreInit(
C);
478 if (
C->getCondition())
479 Profiler->VisitStmt(
C->getCondition());
482void OMPClauseProfiler::VisitOMPFinalClause(
const OMPFinalClause *
C) {
483 VisitOMPClauseWithPreInit(
C);
484 if (
C->getCondition())
485 Profiler->VisitStmt(
C->getCondition());
488void OMPClauseProfiler::VisitOMPNumThreadsClause(
const OMPNumThreadsClause *
C) {
489 Profiler->VisitInteger(
C->getPrescriptivenessModifier());
490 Profiler->VisitInteger(
C->getDimsModifier());
491 if (
const Expr *Modifier =
C->getDimsModifierExpr())
492 Profiler->VisitStmt(Modifier);
493 VisitOMPClauseList(
C);
494 VisitOMPClauseWithPreInit(
C);
497void OMPClauseProfiler::VisitOMPAlignClause(
const OMPAlignClause *
C) {
498 if (
C->getAlignment())
499 Profiler->VisitStmt(
C->getAlignment());
502void OMPClauseProfiler::VisitOMPSafelenClause(
const OMPSafelenClause *
C) {
504 Profiler->VisitStmt(
C->getSafelen());
507void OMPClauseProfiler::VisitOMPSimdlenClause(
const OMPSimdlenClause *
C) {
509 Profiler->VisitStmt(
C->getSimdlen());
512void OMPClauseProfiler::VisitOMPSizesClause(
const OMPSizesClause *
C) {
513 for (
auto *E :
C->getSizesRefs())
515 Profiler->VisitExpr(E);
518void OMPClauseProfiler::VisitOMPCountsClause(
const OMPCountsClause *
C) {
519 for (
auto *E :
C->getCountsRefs())
521 Profiler->VisitExpr(E);
524void OMPClauseProfiler::VisitOMPPermutationClause(
525 const OMPPermutationClause *
C) {
526 for (Expr *E :
C->getArgsRefs())
528 Profiler->VisitExpr(E);
531void OMPClauseProfiler::VisitOMPFullClause(
const OMPFullClause *
C) {}
533void OMPClauseProfiler::VisitOMPPartialClause(
const OMPPartialClause *
C) {
534 if (
const Expr *Factor =
C->getFactor())
535 Profiler->VisitExpr(Factor);
538void OMPClauseProfiler::VisitOMPDepthClause(
const OMPDepthClause *
C) {
539 if (
const Expr *Depth =
C->getDepth())
540 Profiler->VisitExpr(Depth);
543void OMPClauseProfiler::VisitOMPLoopRangeClause(
const OMPLoopRangeClause *
C) {
544 if (
const Expr *
First =
C->getFirst())
545 Profiler->VisitExpr(
First);
546 if (
const Expr *Count =
C->getCount())
547 Profiler->VisitExpr(Count);
550void OMPClauseProfiler::VisitOMPAllocatorClause(
const OMPAllocatorClause *
C) {
551 if (
C->getAllocator())
552 Profiler->VisitStmt(
C->getAllocator());
555void OMPClauseProfiler::VisitOMPCollapseClause(
const OMPCollapseClause *
C) {
556 if (
C->getNumForLoops())
557 Profiler->VisitStmt(
C->getNumForLoops());
560void OMPClauseProfiler::VisitOMPDetachClause(
const OMPDetachClause *
C) {
561 if (Expr *Evt =
C->getEventHandler())
562 Profiler->VisitStmt(Evt);
565void OMPClauseProfiler::VisitOMPNovariantsClause(
const OMPNovariantsClause *
C) {
566 VisitOMPClauseWithPreInit(
C);
567 if (
C->getCondition())
568 Profiler->VisitStmt(
C->getCondition());
571void OMPClauseProfiler::VisitOMPNocontextClause(
const OMPNocontextClause *
C) {
572 VisitOMPClauseWithPreInit(
C);
573 if (
C->getCondition())
574 Profiler->VisitStmt(
C->getCondition());
577void OMPClauseProfiler::VisitOMPDefaultClause(
const OMPDefaultClause *
C) { }
579void OMPClauseProfiler::VisitOMPThreadsetClause(
const OMPThreadsetClause *
C) {}
581void OMPClauseProfiler::VisitOMPTransparentClause(
582 const OMPTransparentClause *
C) {
583 if (
C->getImpexType())
584 Profiler->VisitStmt(
C->getImpexType());
587void OMPClauseProfiler::VisitOMPProcBindClause(
const OMPProcBindClause *
C) { }
589void OMPClauseProfiler::VisitOMPUnifiedAddressClause(
590 const OMPUnifiedAddressClause *
C) {}
592void OMPClauseProfiler::VisitOMPUnifiedSharedMemoryClause(
593 const OMPUnifiedSharedMemoryClause *
C) {}
595void OMPClauseProfiler::VisitOMPReverseOffloadClause(
596 const OMPReverseOffloadClause *
C) {}
598void OMPClauseProfiler::VisitOMPDynamicAllocatorsClause(
599 const OMPDynamicAllocatorsClause *
C) {}
601void OMPClauseProfiler::VisitOMPAtomicDefaultMemOrderClause(
602 const OMPAtomicDefaultMemOrderClause *
C) {}
604void OMPClauseProfiler::VisitOMPSelfMapsClause(
const OMPSelfMapsClause *
C) {}
606void OMPClauseProfiler::VisitOMPAtClause(
const OMPAtClause *
C) {}
608void OMPClauseProfiler::VisitOMPSeverityClause(
const OMPSeverityClause *
C) {}
610void OMPClauseProfiler::VisitOMPMessageClause(
const OMPMessageClause *
C) {
611 if (
C->getMessageString())
612 Profiler->VisitStmt(
C->getMessageString());
615void OMPClauseProfiler::VisitOMPScheduleClause(
const OMPScheduleClause *
C) {
616 VisitOMPClauseWithPreInit(
C);
617 if (
auto *S =
C->getChunkSize())
618 Profiler->VisitStmt(S);
621void OMPClauseProfiler::VisitOMPOrderedClause(
const OMPOrderedClause *
C) {
622 if (
auto *
Num =
C->getNumForLoops())
623 Profiler->VisitStmt(
Num);
626void OMPClauseProfiler::VisitOMPNowaitClause(
const OMPNowaitClause *
C) {
627 if (
C->getCondition())
628 Profiler->VisitStmt(
C->getCondition());
631void OMPClauseProfiler::VisitOMPUntiedClause(
const OMPUntiedClause *) {}
633void OMPClauseProfiler::VisitOMPMergeableClause(
const OMPMergeableClause *) {}
635void OMPClauseProfiler::VisitOMPReadClause(
const OMPReadClause *) {}
637void OMPClauseProfiler::VisitOMPWriteClause(
const OMPWriteClause *) {}
639void OMPClauseProfiler::VisitOMPUpdateClause(
const OMPUpdateClause *) {}
641void OMPClauseProfiler::VisitOMPUpdateDependObjectsClause(
642 const OMPUpdateDependObjectsClause *) {}
644void OMPClauseProfiler::VisitOMPCaptureClause(
const OMPCaptureClause *) {}
646void OMPClauseProfiler::VisitOMPCompareClause(
const OMPCompareClause *) {}
648void OMPClauseProfiler::VisitOMPFailClause(
const OMPFailClause *) {}
650void OMPClauseProfiler::VisitOMPAbsentClause(
const OMPAbsentClause *) {}
652void OMPClauseProfiler::VisitOMPHoldsClause(
const OMPHoldsClause *) {}
654void OMPClauseProfiler::VisitOMPContainsClause(
const OMPContainsClause *) {}
656void OMPClauseProfiler::VisitOMPNoOpenMPClause(
const OMPNoOpenMPClause *) {}
658void OMPClauseProfiler::VisitOMPNoOpenMPRoutinesClause(
659 const OMPNoOpenMPRoutinesClause *) {}
661void OMPClauseProfiler::VisitOMPNoOpenMPConstructsClause(
662 const OMPNoOpenMPConstructsClause *) {}
664void OMPClauseProfiler::VisitOMPNoParallelismClause(
665 const OMPNoParallelismClause *) {}
667void OMPClauseProfiler::VisitOMPSeqCstClause(
const OMPSeqCstClause *) {}
669void OMPClauseProfiler::VisitOMPAcqRelClause(
const OMPAcqRelClause *) {}
671void OMPClauseProfiler::VisitOMPAcquireClause(
const OMPAcquireClause *) {}
673void OMPClauseProfiler::VisitOMPReleaseClause(
const OMPReleaseClause *) {}
675void OMPClauseProfiler::VisitOMPRelaxedClause(
const OMPRelaxedClause *) {}
677void OMPClauseProfiler::VisitOMPWeakClause(
const OMPWeakClause *) {}
679void OMPClauseProfiler::VisitOMPThreadsClause(
const OMPThreadsClause *) {}
681void OMPClauseProfiler::VisitOMPSIMDClause(
const OMPSIMDClause *) {}
683void OMPClauseProfiler::VisitOMPNogroupClause(
const OMPNogroupClause *) {}
685void OMPClauseProfiler::VisitOMPInitClause(
const OMPInitClause *
C) {
687 Profiler->VisitStmt(
C->getInteropVar());
688 Profiler->VisitInteger(
C->hasPreferAttrs() ? 1 : 0);
689 Profiler->VisitInteger(
C->varlist_size() - 1);
690 for (OMPInitClause::PrefView P :
C->prefs()) {
691 Profiler->VisitInteger(P.Fr ? 1 : 0);
693 Profiler->VisitStmt(P.Fr);
694 Profiler->VisitInteger(P.Attrs.size());
695 for (
const Expr *A : P.Attrs)
696 Profiler->VisitStmt(A);
700void OMPClauseProfiler::VisitOMPUseClause(
const OMPUseClause *
C) {
701 if (
C->getInteropVar())
702 Profiler->VisitStmt(
C->getInteropVar());
705void OMPClauseProfiler::VisitOMPDestroyClause(
const OMPDestroyClause *
C) {
706 if (
C->getInteropVar())
707 Profiler->VisitStmt(
C->getInteropVar());
710void OMPClauseProfiler::VisitOMPFilterClause(
const OMPFilterClause *
C) {
711 VisitOMPClauseWithPreInit(
C);
712 if (
C->getThreadID())
713 Profiler->VisitStmt(
C->getThreadID());
717void OMPClauseProfiler::VisitOMPClauseList(
T *Node) {
718 for (
auto *E : Node->varlist()) {
720 Profiler->VisitStmt(E);
724void OMPClauseProfiler::VisitOMPPrivateClause(
const OMPPrivateClause *
C) {
725 VisitOMPClauseList(
C);
726 for (
auto *E :
C->private_copies()) {
728 Profiler->VisitStmt(E);
732OMPClauseProfiler::VisitOMPFirstprivateClause(
const OMPFirstprivateClause *
C) {
733 VisitOMPClauseList(
C);
734 VisitOMPClauseWithPreInit(
C);
735 for (
auto *E :
C->private_copies()) {
737 Profiler->VisitStmt(E);
739 for (
auto *E :
C->inits()) {
741 Profiler->VisitStmt(E);
745OMPClauseProfiler::VisitOMPLastprivateClause(
const OMPLastprivateClause *
C) {
746 VisitOMPClauseList(
C);
747 VisitOMPClauseWithPostUpdate(
C);
748 for (
auto *E :
C->source_exprs()) {
750 Profiler->VisitStmt(E);
752 for (
auto *E :
C->destination_exprs()) {
754 Profiler->VisitStmt(E);
756 for (
auto *E :
C->assignment_ops()) {
758 Profiler->VisitStmt(E);
761void OMPClauseProfiler::VisitOMPSharedClause(
const OMPSharedClause *
C) {
762 VisitOMPClauseList(
C);
764void OMPClauseProfiler::VisitOMPReductionClause(
765 const OMPReductionClause *
C) {
766 Profiler->VisitNestedNameSpecifier(
767 C->getQualifierLoc().getNestedNameSpecifier());
768 Profiler->VisitName(
C->getNameInfo().getName());
769 VisitOMPClauseList(
C);
770 VisitOMPClauseWithPostUpdate(
C);
771 for (
auto *E :
C->privates()) {
773 Profiler->VisitStmt(E);
775 for (
auto *E :
C->lhs_exprs()) {
777 Profiler->VisitStmt(E);
779 for (
auto *E :
C->rhs_exprs()) {
781 Profiler->VisitStmt(E);
783 for (
auto *E :
C->reduction_ops()) {
785 Profiler->VisitStmt(E);
787 if (
C->getModifier() == clang::OMPC_REDUCTION_inscan) {
788 for (
auto *E :
C->copy_ops()) {
790 Profiler->VisitStmt(E);
792 for (
auto *E :
C->copy_array_temps()) {
794 Profiler->VisitStmt(E);
796 for (
auto *E :
C->copy_array_elems()) {
798 Profiler->VisitStmt(E);
802void OMPClauseProfiler::VisitOMPTaskReductionClause(
803 const OMPTaskReductionClause *
C) {
804 Profiler->VisitNestedNameSpecifier(
805 C->getQualifierLoc().getNestedNameSpecifier());
806 Profiler->VisitName(
C->getNameInfo().getName());
807 VisitOMPClauseList(
C);
808 VisitOMPClauseWithPostUpdate(
C);
809 for (
auto *E :
C->privates()) {
811 Profiler->VisitStmt(E);
813 for (
auto *E :
C->lhs_exprs()) {
815 Profiler->VisitStmt(E);
817 for (
auto *E :
C->rhs_exprs()) {
819 Profiler->VisitStmt(E);
821 for (
auto *E :
C->reduction_ops()) {
823 Profiler->VisitStmt(E);
826void OMPClauseProfiler::VisitOMPInReductionClause(
827 const OMPInReductionClause *
C) {
828 Profiler->VisitNestedNameSpecifier(
829 C->getQualifierLoc().getNestedNameSpecifier());
830 Profiler->VisitName(
C->getNameInfo().getName());
831 VisitOMPClauseList(
C);
832 VisitOMPClauseWithPostUpdate(
C);
833 for (
auto *E :
C->privates()) {
835 Profiler->VisitStmt(E);
837 for (
auto *E :
C->lhs_exprs()) {
839 Profiler->VisitStmt(E);
841 for (
auto *E :
C->rhs_exprs()) {
843 Profiler->VisitStmt(E);
845 for (
auto *E :
C->reduction_ops()) {
847 Profiler->VisitStmt(E);
849 for (
auto *E :
C->taskgroup_descriptors()) {
851 Profiler->VisitStmt(E);
854void OMPClauseProfiler::VisitOMPLinearClause(
const OMPLinearClause *
C) {
855 VisitOMPClauseList(
C);
856 VisitOMPClauseWithPostUpdate(
C);
857 for (
auto *E :
C->privates()) {
859 Profiler->VisitStmt(E);
861 for (
auto *E :
C->inits()) {
863 Profiler->VisitStmt(E);
865 for (
auto *E :
C->updates()) {
867 Profiler->VisitStmt(E);
869 for (
auto *E :
C->finals()) {
871 Profiler->VisitStmt(E);
874 Profiler->VisitStmt(
C->getStep());
875 if (
C->getCalcStep())
876 Profiler->VisitStmt(
C->getCalcStep());
878void OMPClauseProfiler::VisitOMPAlignedClause(
const OMPAlignedClause *
C) {
879 VisitOMPClauseList(
C);
880 if (
C->getAlignment())
881 Profiler->VisitStmt(
C->getAlignment());
883void OMPClauseProfiler::VisitOMPCopyinClause(
const OMPCopyinClause *
C) {
884 VisitOMPClauseList(
C);
885 for (
auto *E :
C->source_exprs()) {
887 Profiler->VisitStmt(E);
889 for (
auto *E :
C->destination_exprs()) {
891 Profiler->VisitStmt(E);
893 for (
auto *E :
C->assignment_ops()) {
895 Profiler->VisitStmt(E);
899OMPClauseProfiler::VisitOMPCopyprivateClause(
const OMPCopyprivateClause *
C) {
900 VisitOMPClauseList(
C);
901 for (
auto *E :
C->source_exprs()) {
903 Profiler->VisitStmt(E);
905 for (
auto *E :
C->destination_exprs()) {
907 Profiler->VisitStmt(E);
909 for (
auto *E :
C->assignment_ops()) {
911 Profiler->VisitStmt(E);
914void OMPClauseProfiler::VisitOMPFlushClause(
const OMPFlushClause *
C) {
915 VisitOMPClauseList(
C);
917void OMPClauseProfiler::VisitOMPDepobjClause(
const OMPDepobjClause *
C) {
918 if (
const Expr *Depobj =
C->getDepobj())
919 Profiler->VisitStmt(Depobj);
921void OMPClauseProfiler::VisitOMPDependClause(
const OMPDependClause *
C) {
922 VisitOMPClauseList(
C);
924void OMPClauseProfiler::VisitOMPDeviceClause(
const OMPDeviceClause *
C) {
926 Profiler->VisitStmt(
C->getDevice());
928void OMPClauseProfiler::VisitOMPMapClause(
const OMPMapClause *
C) {
929 VisitOMPClauseList(
C);
931void OMPClauseProfiler::VisitOMPAllocateClause(
const OMPAllocateClause *
C) {
932 if (Expr *Allocator =
C->getAllocator())
933 Profiler->VisitStmt(Allocator);
934 VisitOMPClauseList(
C);
936void OMPClauseProfiler::VisitOMPNumTeamsClause(
const OMPNumTeamsClause *
C) {
937 Profiler->VisitInteger(
C->getModifier());
938 if (
const Expr *Modifier =
C->getModifierExpr())
939 Profiler->VisitStmt(Modifier);
940 VisitOMPClauseList(
C);
941 VisitOMPClauseWithPreInit(
C);
943void OMPClauseProfiler::VisitOMPThreadLimitClause(
944 const OMPThreadLimitClause *
C) {
945 Profiler->VisitInteger(
C->getModifier());
946 if (
const Expr *Modifier =
C->getModifierExpr())
947 Profiler->VisitStmt(Modifier);
948 VisitOMPClauseList(
C);
949 VisitOMPClauseWithPreInit(
C);
951void OMPClauseProfiler::VisitOMPPriorityClause(
const OMPPriorityClause *
C) {
952 VisitOMPClauseWithPreInit(
C);
953 if (
C->getPriority())
954 Profiler->VisitStmt(
C->getPriority());
956void OMPClauseProfiler::VisitOMPGrainsizeClause(
const OMPGrainsizeClause *
C) {
957 VisitOMPClauseWithPreInit(
C);
958 if (
C->getGrainsize())
959 Profiler->VisitStmt(
C->getGrainsize());
961void OMPClauseProfiler::VisitOMPNumTasksClause(
const OMPNumTasksClause *
C) {
962 VisitOMPClauseWithPreInit(
C);
963 if (
C->getNumTasks())
964 Profiler->VisitStmt(
C->getNumTasks());
966void OMPClauseProfiler::VisitOMPHintClause(
const OMPHintClause *
C) {
968 Profiler->VisitStmt(
C->getHint());
970void OMPClauseProfiler::VisitOMPToClause(
const OMPToClause *
C) {
971 VisitOMPClauseList(
C);
973void OMPClauseProfiler::VisitOMPFromClause(
const OMPFromClause *
C) {
974 VisitOMPClauseList(
C);
976void OMPClauseProfiler::VisitOMPUseDevicePtrClause(
977 const OMPUseDevicePtrClause *
C) {
978 VisitOMPClauseList(
C);
980void OMPClauseProfiler::VisitOMPUseDeviceAddrClause(
981 const OMPUseDeviceAddrClause *
C) {
982 VisitOMPClauseList(
C);
984void OMPClauseProfiler::VisitOMPIsDevicePtrClause(
985 const OMPIsDevicePtrClause *
C) {
986 VisitOMPClauseList(
C);
988void OMPClauseProfiler::VisitOMPHasDeviceAddrClause(
989 const OMPHasDeviceAddrClause *
C) {
990 VisitOMPClauseList(
C);
992void OMPClauseProfiler::VisitOMPNontemporalClause(
993 const OMPNontemporalClause *
C) {
994 VisitOMPClauseList(
C);
995 for (
auto *E :
C->private_refs())
996 Profiler->VisitStmt(E);
998void OMPClauseProfiler::VisitOMPInclusiveClause(
const OMPInclusiveClause *
C) {
999 VisitOMPClauseList(
C);
1001void OMPClauseProfiler::VisitOMPExclusiveClause(
const OMPExclusiveClause *
C) {
1002 VisitOMPClauseList(
C);
1004void OMPClauseProfiler::VisitOMPUsesAllocatorsClause(
1005 const OMPUsesAllocatorsClause *
C) {
1006 for (
unsigned I = 0, E =
C->getNumberOfAllocators(); I < E; ++I) {
1007 OMPUsesAllocatorsClause::Data D =
C->getAllocatorData(I);
1013void OMPClauseProfiler::VisitOMPAffinityClause(
const OMPAffinityClause *
C) {
1014 if (
const Expr *Modifier =
C->getModifier())
1015 Profiler->VisitStmt(Modifier);
1016 for (
const Expr *E :
C->varlist())
1017 Profiler->VisitStmt(E);
1019void OMPClauseProfiler::VisitOMPOrderClause(
const OMPOrderClause *
C) {}
1020void OMPClauseProfiler::VisitOMPBindClause(
const OMPBindClause *
C) {}
1021void OMPClauseProfiler::VisitOMPXDynCGroupMemClause(
1022 const OMPXDynCGroupMemClause *
C) {
1023 VisitOMPClauseWithPreInit(
C);
1024 if (Expr *Size =
C->getSize())
1025 Profiler->VisitStmt(Size);
1027void OMPClauseProfiler::VisitOMPDynGroupprivateClause(
1028 const OMPDynGroupprivateClause *
C) {
1029 VisitOMPClauseWithPreInit(
C);
1030 if (
auto *Size =
C->getSize())
1031 Profiler->VisitStmt(Size);
1033void OMPClauseProfiler::VisitOMPDoacrossClause(
const OMPDoacrossClause *
C) {
1034 VisitOMPClauseList(
C);
1036void OMPClauseProfiler::VisitOMPXAttributeClause(
const OMPXAttributeClause *
C) {
1038void OMPClauseProfiler::VisitOMPXBareClause(
const OMPXBareClause *
C) {}
1042StmtProfiler::VisitOMPExecutableDirective(
const OMPExecutableDirective *S) {
1044 OMPClauseProfiler P(
this);
1045 ArrayRef<OMPClause *> Clauses = S->clauses();
1046 for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end();
1052void StmtProfiler::VisitOMPCanonicalLoop(
const OMPCanonicalLoop *L) {
1056void StmtProfiler::VisitOMPLoopBasedDirective(
const OMPLoopBasedDirective *S) {
1057 VisitOMPExecutableDirective(S);
1060void StmtProfiler::VisitOMPLoopDirective(
const OMPLoopDirective *S) {
1061 VisitOMPLoopBasedDirective(S);
1064void StmtProfiler::VisitOMPMetaDirective(
const OMPMetaDirective *S) {
1065 VisitOMPExecutableDirective(S);
1068void StmtProfiler::VisitOMPParallelDirective(
const OMPParallelDirective *S) {
1069 VisitOMPExecutableDirective(S);
1072void StmtProfiler::VisitOMPSimdDirective(
const OMPSimdDirective *S) {
1073 VisitOMPLoopDirective(S);
1076void StmtProfiler::VisitOMPCanonicalLoopNestTransformationDirective(
1077 const OMPCanonicalLoopNestTransformationDirective *S) {
1078 VisitOMPLoopBasedDirective(S);
1081void StmtProfiler::VisitOMPTileDirective(
const OMPTileDirective *S) {
1082 VisitOMPCanonicalLoopNestTransformationDirective(S);
1085void StmtProfiler::VisitOMPStripeDirective(
const OMPStripeDirective *S) {
1086 VisitOMPCanonicalLoopNestTransformationDirective(S);
1089void StmtProfiler::VisitOMPUnrollDirective(
const OMPUnrollDirective *S) {
1090 VisitOMPCanonicalLoopNestTransformationDirective(S);
1093void StmtProfiler::VisitOMPReverseDirective(
const OMPReverseDirective *S) {
1094 VisitOMPCanonicalLoopNestTransformationDirective(S);
1097void StmtProfiler::VisitOMPInterchangeDirective(
1098 const OMPInterchangeDirective *S) {
1099 VisitOMPCanonicalLoopNestTransformationDirective(S);
1102void StmtProfiler::VisitOMPFlattenDirective(
const OMPFlattenDirective *S) {
1103 VisitOMPCanonicalLoopNestTransformationDirective(S);
1106void StmtProfiler::VisitOMPSplitDirective(
const OMPSplitDirective *S) {
1107 VisitOMPCanonicalLoopNestTransformationDirective(S);
1110void StmtProfiler::VisitOMPCanonicalLoopSequenceTransformationDirective(
1111 const OMPCanonicalLoopSequenceTransformationDirective *S) {
1112 VisitOMPExecutableDirective(S);
1115void StmtProfiler::VisitOMPFuseDirective(
const OMPFuseDirective *S) {
1116 VisitOMPCanonicalLoopSequenceTransformationDirective(S);
1119void StmtProfiler::VisitOMPForDirective(
const OMPForDirective *S) {
1120 VisitOMPLoopDirective(S);
1123void StmtProfiler::VisitOMPForSimdDirective(
const OMPForSimdDirective *S) {
1124 VisitOMPLoopDirective(S);
1127void StmtProfiler::VisitOMPSectionsDirective(
const OMPSectionsDirective *S) {
1128 VisitOMPExecutableDirective(S);
1131void StmtProfiler::VisitOMPSectionDirective(
const OMPSectionDirective *S) {
1132 VisitOMPExecutableDirective(S);
1135void StmtProfiler::VisitOMPScopeDirective(
const OMPScopeDirective *S) {
1136 VisitOMPExecutableDirective(S);
1139void StmtProfiler::VisitOMPSingleDirective(
const OMPSingleDirective *S) {
1140 VisitOMPExecutableDirective(S);
1143void StmtProfiler::VisitOMPMasterDirective(
const OMPMasterDirective *S) {
1144 VisitOMPExecutableDirective(S);
1147void StmtProfiler::VisitOMPCriticalDirective(
const OMPCriticalDirective *S) {
1148 VisitOMPExecutableDirective(S);
1153StmtProfiler::VisitOMPParallelForDirective(
const OMPParallelForDirective *S) {
1154 VisitOMPLoopDirective(S);
1157void StmtProfiler::VisitOMPParallelForSimdDirective(
1158 const OMPParallelForSimdDirective *S) {
1159 VisitOMPLoopDirective(S);
1162void StmtProfiler::VisitOMPParallelMasterDirective(
1163 const OMPParallelMasterDirective *S) {
1164 VisitOMPExecutableDirective(S);
1167void StmtProfiler::VisitOMPParallelMaskedDirective(
1168 const OMPParallelMaskedDirective *S) {
1169 VisitOMPExecutableDirective(S);
1172void StmtProfiler::VisitOMPParallelSectionsDirective(
1173 const OMPParallelSectionsDirective *S) {
1174 VisitOMPExecutableDirective(S);
1177void StmtProfiler::VisitOMPTaskDirective(
const OMPTaskDirective *S) {
1178 VisitOMPExecutableDirective(S);
1181void StmtProfiler::VisitOMPTaskyieldDirective(
const OMPTaskyieldDirective *S) {
1182 VisitOMPExecutableDirective(S);
1185void StmtProfiler::VisitOMPBarrierDirective(
const OMPBarrierDirective *S) {
1186 VisitOMPExecutableDirective(S);
1189void StmtProfiler::VisitOMPTaskwaitDirective(
const OMPTaskwaitDirective *S) {
1190 VisitOMPExecutableDirective(S);
1193void StmtProfiler::VisitOMPAssumeDirective(
const OMPAssumeDirective *S) {
1194 VisitOMPExecutableDirective(S);
1197void StmtProfiler::VisitOMPErrorDirective(
const OMPErrorDirective *S) {
1198 VisitOMPExecutableDirective(S);
1200void StmtProfiler::VisitOMPTaskgroupDirective(
const OMPTaskgroupDirective *S) {
1201 VisitOMPExecutableDirective(S);
1206void StmtProfiler::VisitOMPFlushDirective(
const OMPFlushDirective *S) {
1207 VisitOMPExecutableDirective(S);
1210void StmtProfiler::VisitOMPDepobjDirective(
const OMPDepobjDirective *S) {
1211 VisitOMPExecutableDirective(S);
1214void StmtProfiler::VisitOMPScanDirective(
const OMPScanDirective *S) {
1215 VisitOMPExecutableDirective(S);
1218void StmtProfiler::VisitOMPOrderedStandaloneDirective(
1219 const OMPOrderedStandaloneDirective *S) {
1220 VisitOMPExecutableDirective(S);
1223void StmtProfiler::VisitOMPOrderedBlockAssocDirective(
1224 const OMPOrderedBlockAssocDirective *S) {
1225 VisitOMPExecutableDirective(S);
1228void StmtProfiler::VisitOMPAtomicDirective(
const OMPAtomicDirective *S) {
1229 VisitOMPExecutableDirective(S);
1232void StmtProfiler::VisitOMPTargetDirective(
const OMPTargetDirective *S) {
1233 VisitOMPExecutableDirective(S);
1236void StmtProfiler::VisitOMPTargetDataDirective(
const OMPTargetDataDirective *S) {
1237 VisitOMPExecutableDirective(S);
1240void StmtProfiler::VisitOMPTargetEnterDataDirective(
1241 const OMPTargetEnterDataDirective *S) {
1242 VisitOMPExecutableDirective(S);
1245void StmtProfiler::VisitOMPTargetExitDataDirective(
1246 const OMPTargetExitDataDirective *S) {
1247 VisitOMPExecutableDirective(S);
1250void StmtProfiler::VisitOMPTargetParallelDirective(
1251 const OMPTargetParallelDirective *S) {
1252 VisitOMPExecutableDirective(S);
1255void StmtProfiler::VisitOMPTargetParallelForDirective(
1256 const OMPTargetParallelForDirective *S) {
1257 VisitOMPExecutableDirective(S);
1260void StmtProfiler::VisitOMPTeamsDirective(
const OMPTeamsDirective *S) {
1261 VisitOMPExecutableDirective(S);
1264void StmtProfiler::VisitOMPCancellationPointDirective(
1265 const OMPCancellationPointDirective *S) {
1266 VisitOMPExecutableDirective(S);
1269void StmtProfiler::VisitOMPCancelDirective(
const OMPCancelDirective *S) {
1270 VisitOMPExecutableDirective(S);
1273void StmtProfiler::VisitOMPTaskLoopDirective(
const OMPTaskLoopDirective *S) {
1274 VisitOMPLoopDirective(S);
1277void StmtProfiler::VisitOMPTaskLoopSimdDirective(
1278 const OMPTaskLoopSimdDirective *S) {
1279 VisitOMPLoopDirective(S);
1282void StmtProfiler::VisitOMPMasterTaskLoopDirective(
1283 const OMPMasterTaskLoopDirective *S) {
1284 VisitOMPLoopDirective(S);
1287void StmtProfiler::VisitOMPMaskedTaskLoopDirective(
1288 const OMPMaskedTaskLoopDirective *S) {
1289 VisitOMPLoopDirective(S);
1292void StmtProfiler::VisitOMPMasterTaskLoopSimdDirective(
1293 const OMPMasterTaskLoopSimdDirective *S) {
1294 VisitOMPLoopDirective(S);
1297void StmtProfiler::VisitOMPMaskedTaskLoopSimdDirective(
1298 const OMPMaskedTaskLoopSimdDirective *S) {
1299 VisitOMPLoopDirective(S);
1302void StmtProfiler::VisitOMPParallelMasterTaskLoopDirective(
1303 const OMPParallelMasterTaskLoopDirective *S) {
1304 VisitOMPLoopDirective(S);
1307void StmtProfiler::VisitOMPParallelMaskedTaskLoopDirective(
1308 const OMPParallelMaskedTaskLoopDirective *S) {
1309 VisitOMPLoopDirective(S);
1312void StmtProfiler::VisitOMPParallelMasterTaskLoopSimdDirective(
1313 const OMPParallelMasterTaskLoopSimdDirective *S) {
1314 VisitOMPLoopDirective(S);
1317void StmtProfiler::VisitOMPParallelMaskedTaskLoopSimdDirective(
1318 const OMPParallelMaskedTaskLoopSimdDirective *S) {
1319 VisitOMPLoopDirective(S);
1322void StmtProfiler::VisitOMPDistributeDirective(
1323 const OMPDistributeDirective *S) {
1324 VisitOMPLoopDirective(S);
1327void OMPClauseProfiler::VisitOMPDistScheduleClause(
1328 const OMPDistScheduleClause *
C) {
1329 VisitOMPClauseWithPreInit(
C);
1330 if (
auto *S =
C->getChunkSize())
1331 Profiler->VisitStmt(S);
1334void OMPClauseProfiler::VisitOMPDefaultmapClause(
const OMPDefaultmapClause *) {}
1336void StmtProfiler::VisitOMPTargetUpdateDirective(
1337 const OMPTargetUpdateDirective *S) {
1338 VisitOMPExecutableDirective(S);
1341void StmtProfiler::VisitOMPDistributeParallelForDirective(
1342 const OMPDistributeParallelForDirective *S) {
1343 VisitOMPLoopDirective(S);
1346void StmtProfiler::VisitOMPDistributeParallelForSimdDirective(
1347 const OMPDistributeParallelForSimdDirective *S) {
1348 VisitOMPLoopDirective(S);
1351void StmtProfiler::VisitOMPDistributeSimdDirective(
1352 const OMPDistributeSimdDirective *S) {
1353 VisitOMPLoopDirective(S);
1356void StmtProfiler::VisitOMPTargetParallelForSimdDirective(
1357 const OMPTargetParallelForSimdDirective *S) {
1358 VisitOMPLoopDirective(S);
1361void StmtProfiler::VisitOMPTargetSimdDirective(
1362 const OMPTargetSimdDirective *S) {
1363 VisitOMPLoopDirective(S);
1366void StmtProfiler::VisitOMPTeamsDistributeDirective(
1367 const OMPTeamsDistributeDirective *S) {
1368 VisitOMPLoopDirective(S);
1371void StmtProfiler::VisitOMPTeamsDistributeSimdDirective(
1372 const OMPTeamsDistributeSimdDirective *S) {
1373 VisitOMPLoopDirective(S);
1376void StmtProfiler::VisitOMPTeamsDistributeParallelForSimdDirective(
1377 const OMPTeamsDistributeParallelForSimdDirective *S) {
1378 VisitOMPLoopDirective(S);
1381void StmtProfiler::VisitOMPTeamsDistributeParallelForDirective(
1382 const OMPTeamsDistributeParallelForDirective *S) {
1383 VisitOMPLoopDirective(S);
1386void StmtProfiler::VisitOMPTargetTeamsDirective(
1387 const OMPTargetTeamsDirective *S) {
1388 VisitOMPExecutableDirective(S);
1391void StmtProfiler::VisitOMPTargetTeamsDistributeDirective(
1392 const OMPTargetTeamsDistributeDirective *S) {
1393 VisitOMPLoopDirective(S);
1396void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForDirective(
1397 const OMPTargetTeamsDistributeParallelForDirective *S) {
1398 VisitOMPLoopDirective(S);
1401void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
1402 const OMPTargetTeamsDistributeParallelForSimdDirective *S) {
1403 VisitOMPLoopDirective(S);
1406void StmtProfiler::VisitOMPTargetTeamsDistributeSimdDirective(
1407 const OMPTargetTeamsDistributeSimdDirective *S) {
1408 VisitOMPLoopDirective(S);
1411void StmtProfiler::VisitOMPInteropDirective(
const OMPInteropDirective *S) {
1412 VisitOMPExecutableDirective(S);
1415void StmtProfiler::VisitOMPDispatchDirective(
const OMPDispatchDirective *S) {
1416 VisitOMPExecutableDirective(S);
1419void StmtProfiler::VisitOMPMaskedDirective(
const OMPMaskedDirective *S) {
1420 VisitOMPExecutableDirective(S);
1423void StmtProfiler::VisitOMPGenericLoopDirective(
1424 const OMPGenericLoopDirective *S) {
1425 VisitOMPLoopDirective(S);
1428void StmtProfiler::VisitOMPTeamsGenericLoopDirective(
1429 const OMPTeamsGenericLoopDirective *S) {
1430 VisitOMPLoopDirective(S);
1433void StmtProfiler::VisitOMPTargetTeamsGenericLoopDirective(
1434 const OMPTargetTeamsGenericLoopDirective *S) {
1435 VisitOMPLoopDirective(S);
1438void StmtProfiler::VisitOMPParallelGenericLoopDirective(
1439 const OMPParallelGenericLoopDirective *S) {
1440 VisitOMPLoopDirective(S);
1443void StmtProfiler::VisitOMPTargetParallelGenericLoopDirective(
1444 const OMPTargetParallelGenericLoopDirective *S) {
1445 VisitOMPLoopDirective(S);
1448void StmtProfiler::VisitOMPTargetGenericLoopDirective(
1449 const OMPTargetGenericLoopDirective *S) {
1450 VisitOMPLoopDirective(S);
1453void StmtProfiler::VisitExpr(
const Expr *S) {
1457void StmtProfiler::VisitConstantExpr(
const ConstantExpr *S) {
1462void StmtProfiler::VisitDeclRefExpr(
const DeclRefExpr *S) {
1474void StmtProfiler::VisitSYCLUniqueStableNameExpr(
1475 const SYCLUniqueStableNameExpr *S) {
1480void StmtProfiler::VisitUnresolvedSYCLKernelCallStmt(
1481 const UnresolvedSYCLKernelCallStmt *S) {
1485void StmtProfiler::VisitPredefinedExpr(
const PredefinedExpr *S) {
1490void StmtProfiler::VisitOpenACCAsteriskSizeExpr(
1491 const OpenACCAsteriskSizeExpr *S) {
1495void StmtProfiler::VisitIntegerLiteral(
const IntegerLiteral *S) {
1501 T =
T.getCanonicalType();
1503 if (
auto BitIntT =
T->
getAs<BitIntType>()) {
1504 auto [IsUnsigned, NumBits] = BitIntT->getKey();
1505 ID.AddInteger(IsUnsigned);
1506 ID.AddInteger(NumBits);
1508 ID.AddInteger(
T->
castAs<BuiltinType>()->getKind());
1512void StmtProfiler::VisitFixedPointLiteral(
const FixedPointLiteral *S) {
1518void StmtProfiler::VisitCharacterLiteral(
const CharacterLiteral *S) {
1520 ID.AddInteger(llvm::to_underlying(S->
getKind()));
1524void StmtProfiler::VisitFloatingLiteral(
const FloatingLiteral *S) {
1531void StmtProfiler::VisitImaginaryLiteral(
const ImaginaryLiteral *S) {
1535void StmtProfiler::VisitStringLiteral(
const StringLiteral *S) {
1538 ID.AddInteger(llvm::to_underlying(S->
getKind()));
1541void StmtProfiler::VisitParenExpr(
const ParenExpr *S) {
1545void StmtProfiler::VisitParenListExpr(
const ParenListExpr *S) {
1549void StmtProfiler::VisitUnaryOperator(
const UnaryOperator *S) {
1554void StmtProfiler::VisitOffsetOfExpr(
const OffsetOfExpr *S) {
1557 for (
unsigned i = 0; i < n; ++i) {
1583StmtProfiler::VisitUnaryExprOrTypeTraitExpr(
const UnaryExprOrTypeTraitExpr *S) {
1590void StmtProfiler::VisitArraySubscriptExpr(
const ArraySubscriptExpr *S) {
1594void StmtProfiler::VisitMatrixSingleSubscriptExpr(
1595 const MatrixSingleSubscriptExpr *S) {
1599void StmtProfiler::VisitMatrixSubscriptExpr(
const MatrixSubscriptExpr *S) {
1603void StmtProfiler::VisitArraySectionExpr(
const ArraySectionExpr *S) {
1607void StmtProfiler::VisitOMPArrayShapingExpr(
const OMPArrayShapingExpr *S) {
1611void StmtProfiler::VisitOMPIteratorExpr(
const OMPIteratorExpr *S) {
1617void StmtProfiler::VisitCallExpr(
const CallExpr *S) {
1621void StmtProfiler::VisitMemberExpr(
const MemberExpr *S) {
1629void StmtProfiler::VisitCompoundLiteralExpr(
const CompoundLiteralExpr *S) {
1634void StmtProfiler::VisitCastExpr(
const CastExpr *S) {
1638void StmtProfiler::VisitImplicitCastExpr(
const ImplicitCastExpr *S) {
1643void StmtProfiler::VisitExplicitCastExpr(
const ExplicitCastExpr *S) {
1648void StmtProfiler::VisitCStyleCastExpr(
const CStyleCastExpr *S) {
1649 VisitExplicitCastExpr(S);
1652void StmtProfiler::VisitBinaryOperator(
const BinaryOperator *S) {
1658StmtProfiler::VisitCompoundAssignOperator(
const CompoundAssignOperator *S) {
1659 VisitBinaryOperator(S);
1662void StmtProfiler::VisitConditionalOperator(
const ConditionalOperator *S) {
1666void StmtProfiler::VisitBinaryConditionalOperator(
1667 const BinaryConditionalOperator *S) {
1671void StmtProfiler::VisitAddrLabelExpr(
const AddrLabelExpr *S) {
1676void StmtProfiler::VisitStmtExpr(
const StmtExpr *S) {
1680void StmtProfiler::VisitShuffleVectorExpr(
const ShuffleVectorExpr *S) {
1684void StmtProfiler::VisitConvertVectorExpr(
const ConvertVectorExpr *S) {
1688void StmtProfiler::VisitChooseExpr(
const ChooseExpr *S) {
1692void StmtProfiler::VisitGNUNullExpr(
const GNUNullExpr *S) {
1696void StmtProfiler::VisitVAArgExpr(
const VAArgExpr *S) {
1700void StmtProfiler::VisitInitListExpr(
const InitListExpr *S) {
1709void StmtProfiler::VisitDesignatedInitExpr(
const DesignatedInitExpr *S) {
1712 for (
const DesignatedInitExpr::Designator &D : S->
designators()) {
1713 if (D.isFieldDesignator()) {
1715 VisitName(D.getFieldName());
1719 if (D.isArrayDesignator()) {
1722 assert(D.isArrayRangeDesignator());
1725 ID.AddInteger(D.getArrayIndex());
1731void StmtProfiler::VisitDesignatedInitUpdateExpr(
1732 const DesignatedInitUpdateExpr *S) {
1733 llvm_unreachable(
"Unexpected DesignatedInitUpdateExpr in syntactic form of "
1737void StmtProfiler::VisitArrayInitLoopExpr(
const ArrayInitLoopExpr *S) {
1741void StmtProfiler::VisitArrayInitIndexExpr(
const ArrayInitIndexExpr *S) {
1745void StmtProfiler::VisitNoInitExpr(
const NoInitExpr *S) {
1746 llvm_unreachable(
"Unexpected NoInitExpr in syntactic form of initializer");
1749void StmtProfiler::VisitImplicitValueInitExpr(
const ImplicitValueInitExpr *S) {
1753void StmtProfiler::VisitExtVectorElementExpr(
const ExtVectorElementExpr *S) {
1758void StmtProfiler::VisitMatrixElementExpr(
const MatrixElementExpr *S) {
1763void StmtProfiler::VisitBlockExpr(
const BlockExpr *S) {
1768void StmtProfiler::VisitGenericSelectionExpr(
const GenericSelectionExpr *S) {
1772 QualType
T = Assoc.getType();
1774 ID.AddPointer(
nullptr);
1777 VisitExpr(Assoc.getAssociationExpr());
1781void StmtProfiler::VisitPseudoObjectExpr(
const PseudoObjectExpr *S) {
1786 if (
const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(*i))
1787 Visit(OVE->getSourceExpr());
1790void StmtProfiler::VisitAtomicExpr(
const AtomicExpr *S) {
1795void StmtProfiler::VisitConceptSpecializationExpr(
1796 const ConceptSpecializationExpr *S) {
1800 VisitTemplateArgument(Arg);
1803void StmtProfiler::VisitRequiresExpr(
const RequiresExpr *S) {
1807 VisitDecl(LocalParam);
1810 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(Req)) {
1812 ID.AddBoolean(TypeReq->isSubstitutionFailure());
1813 if (!TypeReq->isSubstitutionFailure())
1814 VisitType(TypeReq->getType()->getType());
1815 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(Req)) {
1817 ID.AddBoolean(ExprReq->isExprSubstitutionFailure());
1818 if (!ExprReq->isExprSubstitutionFailure())
1819 Visit(ExprReq->getExpr());
1824 ID.AddBoolean(ExprReq->getNoexceptLoc().isValid());
1825 const concepts::ExprRequirement::ReturnTypeRequirement &RetReq =
1826 ExprReq->getReturnTypeRequirement();
1839 ID.AddBoolean(NestedReq->hasInvalidConstraint());
1840 if (!NestedReq->hasInvalidConstraint())
1841 Visit(NestedReq->getConstraintExpr());
1849 unsigned &NumArgs) {
1855 case OO_Array_Delete:
1857 case OO_Conditional:
1859 llvm_unreachable(
"Invalid operator call kind");
1864 return Stmt::UnaryOperatorClass;
1868 return Stmt::BinaryOperatorClass;
1873 return Stmt::UnaryOperatorClass;
1877 return Stmt::BinaryOperatorClass;
1882 return Stmt::UnaryOperatorClass;
1886 return Stmt::BinaryOperatorClass;
1890 return Stmt::BinaryOperatorClass;
1894 return Stmt::BinaryOperatorClass;
1898 return Stmt::BinaryOperatorClass;
1902 UnaryOp = UO_AddrOf;
1903 return Stmt::UnaryOperatorClass;
1907 return Stmt::BinaryOperatorClass;
1911 return Stmt::BinaryOperatorClass;
1915 return Stmt::UnaryOperatorClass;
1919 return Stmt::UnaryOperatorClass;
1922 BinaryOp = BO_Assign;
1923 return Stmt::BinaryOperatorClass;
1927 return Stmt::BinaryOperatorClass;
1931 return Stmt::BinaryOperatorClass;
1934 BinaryOp = BO_AddAssign;
1935 return Stmt::CompoundAssignOperatorClass;
1938 BinaryOp = BO_SubAssign;
1939 return Stmt::CompoundAssignOperatorClass;
1942 BinaryOp = BO_MulAssign;
1943 return Stmt::CompoundAssignOperatorClass;
1946 BinaryOp = BO_DivAssign;
1947 return Stmt::CompoundAssignOperatorClass;
1949 case OO_PercentEqual:
1950 BinaryOp = BO_RemAssign;
1951 return Stmt::CompoundAssignOperatorClass;
1954 BinaryOp = BO_XorAssign;
1955 return Stmt::CompoundAssignOperatorClass;
1958 BinaryOp = BO_AndAssign;
1959 return Stmt::CompoundAssignOperatorClass;
1962 BinaryOp = BO_OrAssign;
1963 return Stmt::CompoundAssignOperatorClass;
1967 return Stmt::BinaryOperatorClass;
1969 case OO_GreaterGreater:
1971 return Stmt::BinaryOperatorClass;
1973 case OO_LessLessEqual:
1974 BinaryOp = BO_ShlAssign;
1975 return Stmt::CompoundAssignOperatorClass;
1977 case OO_GreaterGreaterEqual:
1978 BinaryOp = BO_ShrAssign;
1979 return Stmt::CompoundAssignOperatorClass;
1983 return Stmt::BinaryOperatorClass;
1985 case OO_ExclaimEqual:
1987 return Stmt::BinaryOperatorClass;
1991 return Stmt::BinaryOperatorClass;
1993 case OO_GreaterEqual:
1995 return Stmt::BinaryOperatorClass;
1999 return Stmt::BinaryOperatorClass;
2003 return Stmt::BinaryOperatorClass;
2007 return Stmt::BinaryOperatorClass;
2010 UnaryOp = NumArgs == 1 ? UO_PreInc : UO_PostInc;
2012 return Stmt::UnaryOperatorClass;
2015 UnaryOp = NumArgs == 1 ? UO_PreDec : UO_PostDec;
2017 return Stmt::UnaryOperatorClass;
2020 BinaryOp = BO_Comma;
2021 return Stmt::BinaryOperatorClass;
2024 BinaryOp = BO_PtrMemI;
2025 return Stmt::BinaryOperatorClass;
2028 return Stmt::ArraySubscriptExprClass;
2031 return Stmt::CallExprClass;
2034 UnaryOp = UO_Coawait;
2035 return Stmt::UnaryOperatorClass;
2038 llvm_unreachable(
"Invalid overloaded operator expression");
2041#if defined(_MSC_VER) && !defined(__clang__)
2046#pragma optimize("", off)
2050void StmtProfiler::VisitCXXOperatorCallExpr(
const CXXOperatorCallExpr *S) {
2058 return Visit(S->
getArg(0));
2066 for (
unsigned I = 0; I != NumArgs; ++I)
2068 if (SC == Stmt::UnaryOperatorClass)
2069 ID.AddInteger(UnaryOp);
2070 else if (SC == Stmt::BinaryOperatorClass ||
2071 SC == Stmt::CompoundAssignOperatorClass)
2072 ID.AddInteger(BinaryOp);
2074 assert(SC == Stmt::ArraySubscriptExprClass || SC == Stmt::CallExprClass);
2083void StmtProfiler::VisitCXXRewrittenBinaryOperator(
2084 const CXXRewrittenBinaryOperator *S) {
2088 "resolved rewritten operator should never be type-dependent");
2093#if defined(_MSC_VER) && !defined(__clang__)
2095#pragma optimize("", on)
2099void StmtProfiler::VisitCXXMemberCallExpr(
const CXXMemberCallExpr *S) {
2103void StmtProfiler::VisitCUDAKernelCallExpr(
const CUDAKernelCallExpr *S) {
2107void StmtProfiler::VisitAsTypeExpr(
const AsTypeExpr *S) {
2111void StmtProfiler::VisitCXXNamedCastExpr(
const CXXNamedCastExpr *S) {
2112 VisitExplicitCastExpr(S);
2115void StmtProfiler::VisitCXXStaticCastExpr(
const CXXStaticCastExpr *S) {
2116 VisitCXXNamedCastExpr(S);
2119void StmtProfiler::VisitCXXDynamicCastExpr(
const CXXDynamicCastExpr *S) {
2120 VisitCXXNamedCastExpr(S);
2124StmtProfiler::VisitCXXReinterpretCastExpr(
const CXXReinterpretCastExpr *S) {
2125 VisitCXXNamedCastExpr(S);
2128void StmtProfiler::VisitCXXConstCastExpr(
const CXXConstCastExpr *S) {
2129 VisitCXXNamedCastExpr(S);
2132void StmtProfiler::VisitBuiltinBitCastExpr(
const BuiltinBitCastExpr *S) {
2137void StmtProfiler::VisitCXXAddrspaceCastExpr(
const CXXAddrspaceCastExpr *S) {
2138 VisitCXXNamedCastExpr(S);
2141void StmtProfiler::VisitUserDefinedLiteral(
const UserDefinedLiteral *S) {
2145void StmtProfiler::VisitCXXBoolLiteralExpr(
const CXXBoolLiteralExpr *S) {
2150void StmtProfiler::VisitCXXNullPtrLiteralExpr(
const CXXNullPtrLiteralExpr *S) {
2154void StmtProfiler::VisitCXXStdInitializerListExpr(
2155 const CXXStdInitializerListExpr *S) {
2159void StmtProfiler::VisitCXXTypeidExpr(
const CXXTypeidExpr *S) {
2165void StmtProfiler::VisitCXXUuidofExpr(
const CXXUuidofExpr *S) {
2171void StmtProfiler::VisitMSPropertyRefExpr(
const MSPropertyRefExpr *S) {
2176void StmtProfiler::VisitMSPropertySubscriptExpr(
2177 const MSPropertySubscriptExpr *S) {
2181void StmtProfiler::VisitCXXThisExpr(
const CXXThisExpr *S) {
2187void StmtProfiler::VisitCXXThrowExpr(
const CXXThrowExpr *S) {
2191void StmtProfiler::VisitCXXDefaultArgExpr(
const CXXDefaultArgExpr *S) {
2196void StmtProfiler::VisitCXXDefaultInitExpr(
const CXXDefaultInitExpr *S) {
2201void StmtProfiler::VisitCXXBindTemporaryExpr(
const CXXBindTemporaryExpr *S) {
2207void StmtProfiler::VisitCXXConstructExpr(
const CXXConstructExpr *S) {
2213void StmtProfiler::VisitCXXInheritedCtorInitExpr(
2214 const CXXInheritedCtorInitExpr *S) {
2219void StmtProfiler::VisitCXXFunctionalCastExpr(
const CXXFunctionalCastExpr *S) {
2220 VisitExplicitCastExpr(S);
2224StmtProfiler::VisitCXXTemporaryObjectExpr(
const CXXTemporaryObjectExpr *S) {
2225 VisitCXXConstructExpr(S);
2229StmtProfiler::VisitLambdaExpr(
const LambdaExpr *S) {
2230 if (!ProfileLambdaExpr) {
2234 VisitStmtNoChildren(S);
2245 ID.AddInteger(
Capture.getCaptureKind());
2246 if (
Capture.capturesVariable())
2247 VisitDecl(
Capture.getCapturedVar());
2256 for (
auto *SubDecl : Lambda->
decls()) {
2257 FunctionDecl *
Call =
nullptr;
2258 if (
auto *FTD = dyn_cast<FunctionTemplateDecl>(SubDecl))
2259 Call = FTD->getTemplatedDecl();
2260 else if (
auto *FD = dyn_cast<FunctionDecl>(SubDecl))
2267 if (!
Call ||
Call->getOverloadedOperator() != OO_Call)
2275void StmtProfiler::VisitCXXReflectExpr(
const CXXReflectExpr *E) {
2279 ID.AddInteger(
static_cast<int>(E->
getKind()));
2281 case ReflectionKind::Null:
2282 assert(
false &&
"null reflection can't be constructed from parsing a "
2283 "reflection operand");
2285 case ReflectionKind::Type: {
2288 if (
const auto *TDT = QT->
getAs<TypedefType>()) {
2289 ID.AddBoolean(
true);
2290 VisitDecl(TDT->getDecl()->getCanonicalDecl());
2294 ID.AddBoolean(
false);
2299 assert(
false &&
"unknown or unimplemented reflection entities");
2303StmtProfiler::VisitCXXScalarValueInitExpr(
const CXXScalarValueInitExpr *S) {
2307void StmtProfiler::VisitCXXDeleteExpr(
const CXXDeleteExpr *S) {
2314void StmtProfiler::VisitCXXNewExpr(
const CXXNewExpr *S) {
2327StmtProfiler::VisitCXXPseudoDestructorExpr(
const CXXPseudoDestructorExpr *S) {
2341void StmtProfiler::VisitOverloadExpr(
const OverloadExpr *S) {
2343 bool DescribingDependentVarTemplate =
2345 if (DescribingDependentVarTemplate) {
2349 VisitName(S->
getName(),
true);
2357StmtProfiler::VisitUnresolvedLookupExpr(
const UnresolvedLookupExpr *S) {
2358 VisitOverloadExpr(S);
2361void StmtProfiler::VisitTypeTraitExpr(
const TypeTraitExpr *S) {
2365 for (
unsigned I = 0, N = S->
getNumArgs(); I != N; ++I)
2369void StmtProfiler::VisitArrayTypeTraitExpr(
const ArrayTypeTraitExpr *S) {
2375void StmtProfiler::VisitExpressionTraitExpr(
const ExpressionTraitExpr *S) {
2381void StmtProfiler::VisitDependentScopeDeclRefExpr(
2382 const DependentScopeDeclRefExpr *S) {
2391void StmtProfiler::VisitExprWithCleanups(
const ExprWithCleanups *S) {
2395void StmtProfiler::VisitCXXUnresolvedConstructExpr(
2396 const CXXUnresolvedConstructExpr *S) {
2402void StmtProfiler::VisitDependentTemplateIdExpr(
2403 const DependentTemplateIdExpr *S) {
2410void StmtProfiler::VisitCXXDependentScopeMemberExpr(
2411 const CXXDependentScopeMemberExpr *S) {
2424void StmtProfiler::VisitUnresolvedMemberExpr(
const UnresolvedMemberExpr *S) {
2437void StmtProfiler::VisitCXXNoexceptExpr(
const CXXNoexceptExpr *S) {
2441void StmtProfiler::VisitPackExpansionExpr(
const PackExpansionExpr *S) {
2445void StmtProfiler::VisitSizeOfPackExpr(
const SizeOfPackExpr *S) {
2449 ID.AddInteger(Args.size());
2450 for (
const auto &TA : Args)
2451 VisitTemplateArgument(TA);
2458void StmtProfiler::VisitPackIndexingExpr(
const PackIndexingExpr *E) {
2459 VisitStmtNoChildren(E);
2470void StmtProfiler::VisitSubstNonTypeTemplateParmPackExpr(
2471 const SubstNonTypeTemplateParmPackExpr *S) {
2477void StmtProfiler::VisitSubstNonTypeTemplateParmExpr(
2478 const SubstNonTypeTemplateParmExpr *E) {
2483void StmtProfiler::VisitFunctionParmPackExpr(
const FunctionParmPackExpr *S) {
2491void StmtProfiler::VisitMaterializeTemporaryExpr(
2492 const MaterializeTemporaryExpr *S) {
2496void StmtProfiler::VisitCXXFoldExpr(
const CXXFoldExpr *S) {
2497 VisitStmtNoChildren(S);
2520void StmtProfiler::VisitCXXParenListInitExpr(
const CXXParenListInitExpr *S) {
2524void StmtProfiler::VisitCoroutineBodyStmt(
const CoroutineBodyStmt *S) {
2528void StmtProfiler::VisitCoreturnStmt(
const CoreturnStmt *S) {
2532void StmtProfiler::VisitCoawaitExpr(
const CoawaitExpr *S) {
2536void StmtProfiler::VisitDependentCoawaitExpr(
const DependentCoawaitExpr *S) {
2540void StmtProfiler::VisitCoyieldExpr(
const CoyieldExpr *S) {
2544void StmtProfiler::VisitOpaqueValueExpr(
const OpaqueValueExpr *E) {
2548void StmtProfiler::VisitSourceLocExpr(
const SourceLocExpr *E) {
2552void StmtProfiler::VisitEmbedExpr(
const EmbedExpr *E) { VisitExpr(E); }
2554void StmtProfiler::VisitCXXExpansionSelectExpr(
2555 const CXXExpansionSelectExpr *E) {
2559void StmtProfiler::VisitRecoveryExpr(
const RecoveryExpr *E) { VisitExpr(E); }
2561void StmtProfiler::VisitObjCObjectLiteral(
const ObjCObjectLiteral *E) {
2565void StmtProfiler::VisitObjCStringLiteral(
const ObjCStringLiteral *S) {
2566 VisitObjCObjectLiteral(S);
2569void StmtProfiler::VisitObjCBoxedExpr(
const ObjCBoxedExpr *E) {
2570 VisitObjCObjectLiteral(E);
2573void StmtProfiler::VisitObjCArrayLiteral(
const ObjCArrayLiteral *E) {
2574 VisitObjCObjectLiteral(E);
2577void StmtProfiler::VisitObjCDictionaryLiteral(
const ObjCDictionaryLiteral *E) {
2578 VisitObjCObjectLiteral(E);
2581void StmtProfiler::VisitObjCEncodeExpr(
const ObjCEncodeExpr *S) {
2586void StmtProfiler::VisitObjCSelectorExpr(
const ObjCSelectorExpr *S) {
2591void StmtProfiler::VisitObjCProtocolExpr(
const ObjCProtocolExpr *S) {
2596void StmtProfiler::VisitObjCIvarRefExpr(
const ObjCIvarRefExpr *S) {
2603void StmtProfiler::VisitObjCPropertyRefExpr(
const ObjCPropertyRefExpr *S) {
2617void StmtProfiler::VisitObjCSubscriptRefExpr(
const ObjCSubscriptRefExpr *S) {
2623void StmtProfiler::VisitObjCMessageExpr(
const ObjCMessageExpr *S) {
2629void StmtProfiler::VisitObjCIsaExpr(
const ObjCIsaExpr *S) {
2634void StmtProfiler::VisitObjCBoolLiteralExpr(
const ObjCBoolLiteralExpr *S) {
2639void StmtProfiler::VisitObjCIndirectCopyRestoreExpr(
2640 const ObjCIndirectCopyRestoreExpr *S) {
2645void StmtProfiler::VisitObjCBridgedCastExpr(
const ObjCBridgedCastExpr *S) {
2646 VisitExplicitCastExpr(S);
2650void StmtProfiler::VisitObjCAvailabilityCheckExpr(
2651 const ObjCAvailabilityCheckExpr *S) {
2655void StmtProfiler::VisitTemplateArguments(
const TemplateArgumentLoc *Args,
2657 ID.AddInteger(NumArgs);
2658 for (
unsigned I = 0; I != NumArgs; ++I)
2662void StmtProfiler::VisitTemplateArgument(
const TemplateArgument &Arg) {
2705 VisitTemplateArgument(P);
2711class OpenACCClauseProfiler
2712 :
public OpenACCClauseVisitor<OpenACCClauseProfiler> {
2713 StmtProfiler &Profiler;
2716 OpenACCClauseProfiler(StmtProfiler &P) : Profiler(P) {}
2718 void VisitOpenACCClauseList(ArrayRef<const OpenACCClause *> Clauses) {
2719 for (
const OpenACCClause *Clause : Clauses) {
2726 void VisitClauseWithVarList(
const OpenACCClauseWithVarList &Clause) {
2728 Profiler.VisitStmt(E);
2731#define VISIT_CLAUSE(CLAUSE_NAME) \
2732 void Visit##CLAUSE_NAME##Clause(const OpenACC##CLAUSE_NAME##Clause &Clause);
2734#include "clang/Basic/OpenACCClauses.def"
2738void OpenACCClauseProfiler::VisitDefaultClause(
2739 const OpenACCDefaultClause &Clause) {}
2741void OpenACCClauseProfiler::VisitIfClause(
const OpenACCIfClause &Clause) {
2743 "if clause requires a valid condition expr");
2747void OpenACCClauseProfiler::VisitCopyClause(
const OpenACCCopyClause &Clause) {
2748 VisitClauseWithVarList(Clause);
2751void OpenACCClauseProfiler::VisitLinkClause(
const OpenACCLinkClause &Clause) {
2752 VisitClauseWithVarList(Clause);
2755void OpenACCClauseProfiler::VisitDeviceResidentClause(
2756 const OpenACCDeviceResidentClause &Clause) {
2757 VisitClauseWithVarList(Clause);
2760void OpenACCClauseProfiler::VisitCopyInClause(
2761 const OpenACCCopyInClause &Clause) {
2762 VisitClauseWithVarList(Clause);
2765void OpenACCClauseProfiler::VisitCopyOutClause(
2766 const OpenACCCopyOutClause &Clause) {
2767 VisitClauseWithVarList(Clause);
2770void OpenACCClauseProfiler::VisitCreateClause(
2771 const OpenACCCreateClause &Clause) {
2772 VisitClauseWithVarList(Clause);
2775void OpenACCClauseProfiler::VisitHostClause(
const OpenACCHostClause &Clause) {
2776 VisitClauseWithVarList(Clause);
2779void OpenACCClauseProfiler::VisitDeviceClause(
2780 const OpenACCDeviceClause &Clause) {
2781 VisitClauseWithVarList(Clause);
2784void OpenACCClauseProfiler::VisitSelfClause(
const OpenACCSelfClause &Clause) {
2790 Profiler.VisitStmt(E);
2794void OpenACCClauseProfiler::VisitFinalizeClause(
2795 const OpenACCFinalizeClause &Clause) {}
2797void OpenACCClauseProfiler::VisitIfPresentClause(
2798 const OpenACCIfPresentClause &Clause) {}
2800void OpenACCClauseProfiler::VisitNumGangsClause(
2801 const OpenACCNumGangsClause &Clause) {
2803 Profiler.VisitStmt(E);
2806void OpenACCClauseProfiler::VisitTileClause(
const OpenACCTileClause &Clause) {
2808 Profiler.VisitStmt(E);
2811void OpenACCClauseProfiler::VisitNumWorkersClause(
2812 const OpenACCNumWorkersClause &Clause) {
2813 assert(Clause.
hasIntExpr() &&
"num_workers clause requires a valid int expr");
2817void OpenACCClauseProfiler::VisitCollapseClause(
2818 const OpenACCCollapseClause &Clause) {
2819 assert(Clause.
getLoopCount() &&
"collapse clause requires a valid int expr");
2823void OpenACCClauseProfiler::VisitPrivateClause(
2824 const OpenACCPrivateClause &Clause) {
2825 VisitClauseWithVarList(Clause);
2828 Profiler.VisitDecl(Recipe.AllocaDecl);
2832void OpenACCClauseProfiler::VisitFirstPrivateClause(
2833 const OpenACCFirstPrivateClause &Clause) {
2834 VisitClauseWithVarList(Clause);
2837 Profiler.VisitDecl(Recipe.AllocaDecl);
2838 Profiler.VisitDecl(Recipe.InitFromTemporary);
2842void OpenACCClauseProfiler::VisitAttachClause(
2843 const OpenACCAttachClause &Clause) {
2844 VisitClauseWithVarList(Clause);
2847void OpenACCClauseProfiler::VisitDetachClause(
2848 const OpenACCDetachClause &Clause) {
2849 VisitClauseWithVarList(Clause);
2852void OpenACCClauseProfiler::VisitDeleteClause(
2853 const OpenACCDeleteClause &Clause) {
2854 VisitClauseWithVarList(Clause);
2857void OpenACCClauseProfiler::VisitDevicePtrClause(
2858 const OpenACCDevicePtrClause &Clause) {
2859 VisitClauseWithVarList(Clause);
2862void OpenACCClauseProfiler::VisitNoCreateClause(
2863 const OpenACCNoCreateClause &Clause) {
2864 VisitClauseWithVarList(Clause);
2867void OpenACCClauseProfiler::VisitPresentClause(
2868 const OpenACCPresentClause &Clause) {
2869 VisitClauseWithVarList(Clause);
2872void OpenACCClauseProfiler::VisitUseDeviceClause(
2873 const OpenACCUseDeviceClause &Clause) {
2874 VisitClauseWithVarList(Clause);
2877void OpenACCClauseProfiler::VisitVectorLengthClause(
2878 const OpenACCVectorLengthClause &Clause) {
2880 "vector_length clause requires a valid int expr");
2884void OpenACCClauseProfiler::VisitAsyncClause(
const OpenACCAsyncClause &Clause) {
2889void OpenACCClauseProfiler::VisitDeviceNumClause(
2890 const OpenACCDeviceNumClause &Clause) {
2894void OpenACCClauseProfiler::VisitDefaultAsyncClause(
2895 const OpenACCDefaultAsyncClause &Clause) {
2899void OpenACCClauseProfiler::VisitWorkerClause(
2900 const OpenACCWorkerClause &Clause) {
2905void OpenACCClauseProfiler::VisitVectorClause(
2906 const OpenACCVectorClause &Clause) {
2911void OpenACCClauseProfiler::VisitWaitClause(
const OpenACCWaitClause &Clause) {
2915 Profiler.VisitStmt(E);
2919void OpenACCClauseProfiler::VisitDeviceTypeClause(
2920 const OpenACCDeviceTypeClause &Clause) {}
2922void OpenACCClauseProfiler::VisitAutoClause(
const OpenACCAutoClause &Clause) {}
2924void OpenACCClauseProfiler::VisitIndependentClause(
2925 const OpenACCIndependentClause &Clause) {}
2927void OpenACCClauseProfiler::VisitSeqClause(
const OpenACCSeqClause &Clause) {}
2928void OpenACCClauseProfiler::VisitNoHostClause(
2929 const OpenACCNoHostClause &Clause) {}
2931void OpenACCClauseProfiler::VisitGangClause(
const OpenACCGangClause &Clause) {
2932 for (
unsigned I = 0; I < Clause.
getNumExprs(); ++I) {
2933 Profiler.VisitStmt(Clause.
getExpr(I).second);
2937void OpenACCClauseProfiler::VisitReductionClause(
2938 const OpenACCReductionClause &Clause) {
2939 VisitClauseWithVarList(Clause);
2942 Profiler.VisitDecl(Recipe.AllocaDecl);
2947 static_assert(
sizeof(OpenACCReductionRecipe::CombinerRecipe) ==
2949 for (
auto &CombinerRecipe : Recipe.CombinerRecipes) {
2950 if (CombinerRecipe.Op) {
2951 Profiler.VisitDecl(CombinerRecipe.LHS);
2952 Profiler.VisitDecl(CombinerRecipe.RHS);
2953 Profiler.VisitStmt(CombinerRecipe.Op);
2959void OpenACCClauseProfiler::VisitBindClause(
const OpenACCBindClause &Clause) {
2960 assert(
false &&
"not implemented... what can we do about our expr?");
2964void StmtProfiler::VisitOpenACCComputeConstruct(
2969 OpenACCClauseProfiler P{*
this};
2970 P.VisitOpenACCClauseList(S->clauses());
2973void StmtProfiler::VisitOpenACCLoopConstruct(
const OpenACCLoopConstruct *S) {
2977 OpenACCClauseProfiler P{*
this};
2978 P.VisitOpenACCClauseList(S->clauses());
2981void StmtProfiler::VisitOpenACCCombinedConstruct(
2982 const OpenACCCombinedConstruct *S) {
2986 OpenACCClauseProfiler P{*
this};
2987 P.VisitOpenACCClauseList(S->clauses());
2990void StmtProfiler::VisitOpenACCDataConstruct(
const OpenACCDataConstruct *S) {
2993 OpenACCClauseProfiler P{*
this};
2994 P.VisitOpenACCClauseList(S->clauses());
2997void StmtProfiler::VisitOpenACCEnterDataConstruct(
2998 const OpenACCEnterDataConstruct *S) {
3001 OpenACCClauseProfiler P{*
this};
3002 P.VisitOpenACCClauseList(S->clauses());
3005void StmtProfiler::VisitOpenACCExitDataConstruct(
3006 const OpenACCExitDataConstruct *S) {
3009 OpenACCClauseProfiler P{*
this};
3010 P.VisitOpenACCClauseList(S->clauses());
3013void StmtProfiler::VisitOpenACCHostDataConstruct(
3014 const OpenACCHostDataConstruct *S) {
3017 OpenACCClauseProfiler P{*
this};
3018 P.VisitOpenACCClauseList(S->clauses());
3021void StmtProfiler::VisitOpenACCWaitConstruct(
const OpenACCWaitConstruct *S) {
3025 OpenACCClauseProfiler P{*
this};
3026 P.VisitOpenACCClauseList(S->clauses());
3029void StmtProfiler::VisitOpenACCCacheConstruct(
const OpenACCCacheConstruct *S) {
3034void StmtProfiler::VisitOpenACCInitConstruct(
const OpenACCInitConstruct *S) {
3036 OpenACCClauseProfiler P{*
this};
3037 P.VisitOpenACCClauseList(S->clauses());
3040void StmtProfiler::VisitOpenACCShutdownConstruct(
3041 const OpenACCShutdownConstruct *S) {
3043 OpenACCClauseProfiler P{*
this};
3044 P.VisitOpenACCClauseList(S->clauses());
3047void StmtProfiler::VisitOpenACCSetConstruct(
const OpenACCSetConstruct *S) {
3049 OpenACCClauseProfiler P{*
this};
3050 P.VisitOpenACCClauseList(S->clauses());
3053void StmtProfiler::VisitOpenACCUpdateConstruct(
3054 const OpenACCUpdateConstruct *S) {
3056 OpenACCClauseProfiler P{*
this};
3057 P.VisitOpenACCClauseList(S->clauses());
3060void StmtProfiler::VisitOpenACCAtomicConstruct(
3061 const OpenACCAtomicConstruct *S) {
3063 OpenACCClauseProfiler P{*
this};
3064 P.VisitOpenACCClauseList(S->clauses());
3067void StmtProfiler::VisitHLSLOutArgExpr(
const HLSLOutArgExpr *S) {
3072 bool Canonical,
bool ProfileLambdaExpr)
const {
3073 StmtProfilerWithPointers Profiler(ID, Context, Canonical, ProfileLambdaExpr);
3074 Profiler.Visit(
this);
3079 StmtProfilerWithoutPointers Profiler(ID, Hash);
3080 Profiler.Visit(
this);
Defines the clang::ASTContext interface.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes,...
This file defines OpenMP AST classes for clauses.
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, UnaryOperatorKind &UnaryOp, BinaryOperatorKind &BinaryOp, unsigned &NumArgs)
static const TemplateArgument & getArgument(const TemplateArgument &A)
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
llvm::APInt getValue() const
void Profile(llvm::FoldingSetNodeID &ID) const
profile this value.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
LabelDecl * getLabel() const
ArrayTypeTrait getTrait() const
QualType getQueriedType() const
unsigned getNumClobbers() const
unsigned getNumOutputs() const
unsigned getNumInputs() const
const BlockDecl * getBlockDecl() const
CXXTemporary * getTemporary()
QualType getCaughtType() const
bool isElidable() const
Whether this construction is elidable.
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
const ParmVarDecl * getParam() const
FieldDecl * getField()
Get the field whose initializer will be used.
FunctionDecl * getOperatorDelete() const
bool isGlobalDelete() const
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
bool isImplicitAccess() const
True if this is an implicit access, i.e.
bool shouldApplyLifetimeExtensionToPreamble() const
BinaryOperatorKind getOperator() const
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
QualType getAllocatedType() const
CXXNewInitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
FunctionDecl * getOperatorDelete() const
unsigned getNumPlacementArgs() const
bool isParenTypeId() const
FunctionDecl * getOperatorNew() const
A call to an overloaded operator written using operator syntax.
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an '->' (otherwise,...
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
QualType getDestroyedType() const
Retrieve the type being destroyed.
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
const IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
capture_const_range captures() const
ReflectionKind getKind() const
const TypeSourceInfo * getTypeSourceInfo() const
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
bool isReversed() const
Determine whether this expression was rewritten in reverse form.
const CXXDestructorDecl * getDestructor() const
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
bool isTypeOperand() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
bool isListInitialization() const
Determine whether this expression models list-initialization.
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
bool isTypeOperand() const
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
unsigned getValue() const
CharacterLiteralKind getKind() const
ArrayRef< TemplateArgument > getTemplateArguments() const
TemplateName getNamedConcept() const
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
bool hasExplicitTemplateArgs() const
Determines whether this declaration reference was followed by an explicit template argument list.
NestedNameSpecifier getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Decl - This represents one declaration (or definition), e.g.
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
The name of a declaration.
void * getAsOpaquePtr() const
Get the representation of this declaration name as an opaque pointer.
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
unsigned getNumTemplateArgs() const
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
TemplateArgumentLoc const * getTemplateArgs() const
ArrayRef< TemplateArgumentLoc > template_arguments() const
TemplateName getTemplateName() const
unsigned getNumTemplateArgs() const
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
MutableArrayRef< Designator > designators()
IdentifierInfo & getAccessor() const
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to.
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
bool isTypeDependent() const
Determines whether the type of this expression depends on.
Expr * getQueriedExpression() const
ExpressionTrait getTrait() const
llvm::APInt getValue() const
Returns an internal integer representation of the literal.
llvm::APFloat getValue() const
const Expr * getSubExpr() const
ValueDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
ValueDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
unsigned getNumLabels() const
const Expr * getOutputConstraintExpr(unsigned i) const
StringRef getInputName(unsigned i) const
StringRef getOutputName(unsigned i) const
const Expr * getInputConstraintExpr(unsigned i) const
const Expr * getAsmStringExpr() const
Expr * getClobberExpr(unsigned i)
association_range associations()
AssociationTy< true > ConstAssociation
LabelDecl * getLabel() const
One of these records is kept for each identifier that is lexed.
VarDecl * getConditionVariable()
Retrieve the variable declared in this "if" statement, if any.
InitListExpr * getSyntacticForm() const
LabelDecl * getDecl() const
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
bool isIfExists() const
Determine whether this is an __if_exists statement.
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we're testing for, along with location information.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
MSPropertyDecl * getPropertyDecl() const
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
NestedNameSpecifier getCanonical() const
Retrieves the "canonical" nested name specifier for a given nested name specifier.
void Profile(llvm::FoldingSetNodeID &ID) const
void AddFunctionDecl(const FunctionDecl *Function, bool SkipBody=false)
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc.
Class that handles pre-initialization statement for some clauses, like 'schedule',...
unsigned numOfIterators() const
Returns number of iterator definitions.
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
const VarDecl * getCatchParamDecl() const
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
QualType getEncodedType() const
bool shouldCopy() const
shouldCopy - True if we should do the 'copy' part of the copy-restore.
Selector getSelector() const
const ObjCMethodDecl * getMethodDecl() const
ObjCPropertyDecl * getExplicitProperty() const
ObjCMethodDecl * getImplicitPropertyGetter() const
QualType getSuperReceiverType() const
bool isImplicitProperty() const
ObjCMethodDecl * getImplicitPropertySetter() const
bool isSuperReceiver() const
ObjCProtocolDecl * getProtocol() const
Selector getSelector() const
ObjCMethodDecl * getAtIndexMethodDecl() const
ObjCMethodDecl * setAtIndexMethodDecl() const
const OffsetOfNode & getComponent(unsigned Idx) const
TypeSourceInfo * getTypeSourceInfo() const
unsigned getNumComponents() const
const IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
FieldDecl * getField() const
For a field offsetof node, returns the field.
@ Array
An index into an array.
@ Identifier
A field in a dependent type, known only by its name.
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
Kind getKind() const
Determine what kind of offsetof node this is.
bool hasConditionExpr() const
const Expr * getConditionExpr() const
const Expr * getIntExpr() const
ArrayRef< Expr * > getVarList() const
const Expr * getLoopCount() const
ArrayRef< OpenACCFirstPrivateRecipe > getInitRecipes() const
unsigned getNumExprs() const
std::pair< OpenACCGangKind, const Expr * > getExpr(unsigned I) const
ArrayRef< Expr * > getIntExprs() const
ArrayRef< OpenACCPrivateRecipe > getInitRecipes() const
ArrayRef< OpenACCReductionRecipe > getRecipes() const
const Expr * getConditionExpr() const
bool isConditionExprClause() const
bool hasConditionExpr() const
ArrayRef< Expr * > getVarList() const
ArrayRef< Expr * > getSizeExprs() const
Expr * getDevNumExpr() const
bool hasDevNumExpr() const
ArrayRef< Expr * > getQueueIdExprs() const
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
NestedNameSpecifier getQualifier() const
Fetches the nested-name qualifier, if one was given.
decls_iterator decls_begin() const
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
TemplateArgumentLoc const * getTemplateArgs() const
unsigned getNumTemplateArgs() const
DeclarationName getName() const
Gets the name looked up.
Expr * getIndexExpr() const
ArrayRef< Expr * > getExpressions() const
Return the trailing expressions, regardless of the expansion.
bool expandsToEmptyPack() const
Determine if the expression was expanded to empty.
Expr * getPackIdExpression() const
PredefinedIdentKind getIdentKind() const
semantics_iterator semantics_end()
semantics_iterator semantics_begin()
const Expr *const * const_semantics_iterator
A (possibly-)qualified type.
ArrayRef< concepts::Requirement * > getRequirements() const
ArrayRef< ParmVarDecl * > getLocalParameters() const
TypeSourceInfo * getTypeSourceInfo()
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof... expression, such as is produced f...
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
NamedDecl * getPack() const
Retrieve the parameter pack.
Stmt - This represents one statement.
void ProcessODRHash(llvm::FoldingSetNodeID &ID, ODRHash &Hash) const
Calculate a unique representation for a statement that is stable across compiler invocations.
StmtClass getStmtClass() const
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical, bool ProfileLambdaExpr=false) const
Produce a unique representation of the given statement.
StringLiteralKind getKind() const
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Expr * getReplacement() const
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
Location wrapper for a TemplateArgument.
Represents a template argument.
QualType getStructuralValueType() const
Get the type of a StructuralValue.
QualType getParamTypeForDecl() const
Expr * getAsExpr() const
Retrieve the template argument as an expression.
QualType getAsType() const
Retrieve the type for a type template argument.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
QualType getIntegralType() const
Retrieve the type of the integral value.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
@ Template
The template argument is a template name that was provided for a template template parameter.
@ StructuralValue
The template argument is a non-type template argument that can't be represented by the special-case D...
@ Pack
The template argument is actually a parameter pack.
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
@ Type
The template argument is a type.
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
ArgKind getKind() const
Return the kind of stored template argument.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
const APValue & getAsStructuralValue() const
Get the value of a StructuralValue.
Represents a C++ template name within the type system.
void Profile(llvm::FoldingSetNodeID &ID)
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
QualType getType() const
Return the type wrapped by this type source info.
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
TypeTrait getTrait() const
Determine which type trait this expression uses.
const T * castAs() const
Member-template castAs<specific type>.
TypeClass getTypeClass() const
const T * getAs() const
Member-template getAs<specific type>'.
QualType getArgumentType() const
bool isArgumentType() const
UnaryExprOrTypeTrait getKind() const
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
bool isTypeConstraint() const
const TypeConstraint * getTypeConstraint() const
bool isSubstitutionFailure() const
Top level wrappers for InstallAPI frontend operations.
@ OO_None
Not an overloaded operator.
@ NUM_OVERLOADED_OPERATORS
bool isa(CodeGen::Address addr)
@ TemplateName
The identifier is a template name. FIXME: Add an annotation for that.
OpenACCComputeConstruct(OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
const FunctionProtoType * T
U cast(CodeGen::Address addr)
bool isTypeAliasAsReflectionName(QualType QT)
[expr.reflect] p5, if a reflect-expression R matches the form ^^reflection-name it is interpreted as ...
__builtin_elementwise_add_sat __builtin_elementwise_sub_sat uint32_t uint64_t __builtin_riscv_ssha_i32 __builtin_riscv_sshl_u32 uint64_t
Expr * AllocatorTraits
Allocator traits.
Expr * Allocator
Allocator.
DeclarationName getName() const
getName - Returns the embedded declaration name.