15#include "llvm/ADT/StringRef.h"
16#include "llvm/ADT/StringSwitch.h"
17#include "llvm/Support/ErrorHandling.h"
21using namespace llvm::omp;
26 return llvm::StringSwitch<OpenMPDefaultClauseVariableCategory>(Str)
27#define OPENMP_DEFAULT_VARIABLE_CATEGORY(Name) \
28 .Case(#Name, OMPC_DEFAULT_VC_##Name)
29#include "clang/Basic/OpenMPKinds.def"
35#define OPENMP_DEFAULT_VARIABLE_CATEGORY(Name) \
36 case OMPC_DEFAULT_VC_##Name: \
38#include "clang/Basic/OpenMPKinds.def"
40 llvm_unreachable(
"Invalid Variable Category in the default clause");
47 return llvm::StringSwitch<unsigned>(Str)
48#define OMP_DEFAULT_KIND(Enum, Name) .Case(Name, unsigned(Enum))
49#include "llvm/Frontend/OpenMP/OMPKinds.def"
50 .Default(
unsigned(llvm::omp::OMP_DEFAULT_unknown));
52 return llvm::StringSwitch<unsigned>(Str)
53#define OMP_PROC_BIND_KIND(Enum, Name, Value) .Case(Name, Value)
54#include "llvm/Frontend/OpenMP/OMPKinds.def"
55 .Default(
unsigned(llvm::omp::OMP_PROC_BIND_unknown));
57 return llvm::StringSwitch<unsigned>(Str)
58#define OPENMP_SCHEDULE_KIND(Name) \
59 .Case(#Name, static_cast<unsigned>(OMPC_SCHEDULE_##Name))
60#define OPENMP_SCHEDULE_MODIFIER(Name) \
61 .Case(#Name, static_cast<unsigned>(OMPC_SCHEDULE_MODIFIER_##Name))
62#include "clang/Basic/OpenMPKinds.def"
65 unsigned Type = llvm::StringSwitch<unsigned>(Str)
66#define OPENMP_DEPEND_KIND(Name) .Case(#Name, OMPC_DEPEND_##Name)
67#include "clang/Basic/OpenMPKinds.def"
69 if (LangOpts.OpenMP < 51 &&
Type == OMPC_DEPEND_inoutset)
74 return llvm::StringSwitch<OpenMPDoacrossClauseModifier>(Str)
75#define OPENMP_DOACROSS_MODIFIER(Name) .Case(#Name, OMPC_DOACROSS_##Name)
76#include "clang/Basic/OpenMPKinds.def"
79 return llvm::StringSwitch<OpenMPLinearClauseKind>(Str)
80#define OPENMP_LINEAR_KIND(Name) .Case(#Name, OMPC_LINEAR_##Name)
81#include "clang/Basic/OpenMPKinds.def"
84 unsigned Type = llvm::StringSwitch<unsigned>(Str)
85#define OPENMP_MAP_KIND(Name) \
86 .Case(#Name, static_cast<unsigned>(OMPC_MAP_##Name))
87#define OPENMP_MAP_MODIFIER_KIND(Name) \
88 .Case(#Name, static_cast<unsigned>(OMPC_MAP_MODIFIER_##Name))
89#include "clang/Basic/OpenMPKinds.def"
91 if (LangOpts.OpenMP < 51 &&
Type == OMPC_MAP_MODIFIER_present)
93 if (!LangOpts.OpenMPExtensions &&
Type == OMPC_MAP_MODIFIER_ompx_hold)
99 unsigned Type = llvm::StringSwitch<unsigned>(Str)
100#define OPENMP_MOTION_MODIFIER_KIND(Name) \
101 .Case(#Name, static_cast<unsigned>(OMPC_MOTION_MODIFIER_##Name))
102#include "clang/Basic/OpenMPKinds.def"
104 if (LangOpts.OpenMP < 51 &&
Type == OMPC_MOTION_MODIFIER_present)
108 case OMPC_dist_schedule:
109 return llvm::StringSwitch<OpenMPDistScheduleClauseKind>(Str)
110#define OPENMP_DIST_SCHEDULE_KIND(Name) .Case(#Name, OMPC_DIST_SCHEDULE_##Name)
111#include "clang/Basic/OpenMPKinds.def"
113 case OMPC_defaultmap: {
114 unsigned Type = llvm::StringSwitch<unsigned>(Str)
115#define OPENMP_DEFAULTMAP_KIND(Name) \
116 .Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_##Name))
117#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
118 .Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_MODIFIER_##Name))
119#include "clang/Basic/OpenMPKinds.def"
121 if (LangOpts.OpenMP < 60 &&
Type == OMPC_DEFAULTMAP_MODIFIER_storage)
125 case OMPC_atomic_default_mem_order:
126 return llvm::StringSwitch<OpenMPAtomicDefaultMemOrderClauseKind>(Str)
127#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \
128 .Case(#Name, OMPC_ATOMIC_DEFAULT_MEM_ORDER_##Name)
129#include "clang/Basic/OpenMPKinds.def"
132 return static_cast<unsigned int>(llvm::StringSwitch<llvm::omp::Clause>(Str)
133#define OPENMP_ATOMIC_FAIL_MODIFIER(Name) .Case(#Name, OMPC_##Name)
134#include "clang/Basic/OpenMPKinds.def"
135 .Default(OMPC_unknown));
136 case OMPC_device_type:
137 return llvm::StringSwitch<OpenMPDeviceType>(Str)
138#define OPENMP_DEVICE_TYPE_KIND(Name) .Case(#Name, OMPC_DEVICE_TYPE_##Name)
139#include "clang/Basic/OpenMPKinds.def"
142 return llvm::StringSwitch<OpenMPAtClauseKind>(Str)
143#define OPENMP_AT_KIND(Name) .Case(#Name, OMPC_AT_##Name)
144#include "clang/Basic/OpenMPKinds.def"
147 return llvm::StringSwitch<OpenMPSeverityClauseKind>(Str)
148#define OPENMP_SEVERITY_KIND(Name) .Case(#Name, OMPC_SEVERITY_##Name)
149#include "clang/Basic/OpenMPKinds.def"
151 case OMPC_lastprivate:
152 return llvm::StringSwitch<OpenMPLastprivateModifier>(Str)
153#define OPENMP_LASTPRIVATE_KIND(Name) .Case(#Name, OMPC_LASTPRIVATE_##Name)
154#include "clang/Basic/OpenMPKinds.def"
157 return llvm::StringSwitch<unsigned>(Str)
158#define OPENMP_ORDER_KIND(Name) \
159 .Case(#Name, static_cast<unsigned>(OMPC_ORDER_##Name))
160#define OPENMP_ORDER_MODIFIER(Name) \
161 .Case(#Name, static_cast<unsigned>(OMPC_ORDER_MODIFIER_##Name))
162#include "clang/Basic/OpenMPKinds.def"
165 return llvm::StringSwitch<OpenMPDependClauseKind>(Str)
166#define OPENMP_DEPEND_KIND(Name) .Case(#Name, OMPC_DEPEND_##Name)
167#include "clang/Basic/OpenMPKinds.def"
170 return llvm::StringSwitch<OpenMPDeviceClauseModifier>(Str)
171#define OPENMP_DEVICE_MODIFIER(Name) .Case(#Name, OMPC_DEVICE_##Name)
172#include "clang/Basic/OpenMPKinds.def"
175 return llvm::StringSwitch<OpenMPReductionClauseModifier>(Str)
176#define OPENMP_REDUCTION_MODIFIER(Name) .Case(#Name, OMPC_REDUCTION_##Name)
177#include "clang/Basic/OpenMPKinds.def"
179 case OMPC_adjust_args:
180 return llvm::StringSwitch<OpenMPAdjustArgsOpKind>(Str)
181#define OPENMP_ADJUST_ARGS_KIND(Name) .Case(#Name, OMPC_ADJUST_ARGS_##Name)
182#include "clang/Basic/OpenMPKinds.def"
185 return llvm::StringSwitch<unsigned>(Str)
186#define OPENMP_BIND_KIND(Name) .Case(#Name, OMPC_BIND_##Name)
187#include "clang/Basic/OpenMPKinds.def"
189 case OMPC_grainsize: {
190 unsigned Type = llvm::StringSwitch<unsigned>(Str)
191#define OPENMP_GRAINSIZE_MODIFIER(Name) .Case(#Name, OMPC_GRAINSIZE_##Name)
192#include "clang/Basic/OpenMPKinds.def"
194 if (LangOpts.OpenMP < 51)
198 case OMPC_num_tasks: {
199 unsigned Type = llvm::StringSwitch<unsigned>(Str)
200#define OPENMP_NUMTASKS_MODIFIER(Name) .Case(#Name, OMPC_NUMTASKS_##Name)
201#include "clang/Basic/OpenMPKinds.def"
203 if (LangOpts.OpenMP < 51)
208 return llvm::StringSwitch<OpenMPAllocateClauseModifier>(Str)
209#define OPENMP_ALLOCATE_MODIFIER(Name) .Case(#Name, OMPC_ALLOCATE_##Name)
210#include "clang/Basic/OpenMPKinds.def"
212 case OMPC_num_threads: {
213 unsigned Type = llvm::StringSwitch<unsigned>(Str)
214#define OPENMP_NUMTHREADS_MODIFIER(Name) .Case(#Name, OMPC_NUMTHREADS_##Name)
215#include "clang/Basic/OpenMPKinds.def"
217 if (LangOpts.OpenMP < 60)
222 case OMPC_threadprivate:
228 case OMPC_permutation:
232 case OMPC_firstprivate:
234 case OMPC_task_reduction:
235 case OMPC_in_reduction:
238 case OMPC_copyprivate:
257 case OMPC_thread_limit:
262 case OMPC_use_device_ptr:
263 case OMPC_use_device_addr:
264 case OMPC_is_device_ptr:
265 case OMPC_has_device_addr:
266 case OMPC_unified_address:
267 case OMPC_unified_shared_memory:
268 case OMPC_reverse_offload:
269 case OMPC_dynamic_allocators:
272 case OMPC_nontemporal:
274 case OMPC_novariants:
279 case OMPC_uses_allocators:
282 case OMPC_append_args:
287 llvm_unreachable(
"Invalid OpenMP simple clause kind");
294 switch (llvm::omp::DefaultKind(
Type)) {
295#define OMP_DEFAULT_KIND(Enum, Name) \
298#include "llvm/Frontend/OpenMP/OMPKinds.def"
300 llvm_unreachable(
"Invalid OpenMP 'default' clause type");
303#define OMP_PROC_BIND_KIND(Enum, Name, Value) \
306#include "llvm/Frontend/OpenMP/OMPKinds.def"
308 llvm_unreachable(
"Invalid OpenMP 'proc_bind' clause type");
314#define OPENMP_SCHEDULE_KIND(Name) \
315 case OMPC_SCHEDULE_##Name: \
317#define OPENMP_SCHEDULE_MODIFIER(Name) \
318 case OMPC_SCHEDULE_MODIFIER_##Name: \
320#include "clang/Basic/OpenMPKinds.def"
322 llvm_unreachable(
"Invalid OpenMP 'schedule' clause type");
327#define OPENMP_DEPEND_KIND(Name) \
328 case OMPC_DEPEND_##Name: \
330#include "clang/Basic/OpenMPKinds.def"
332 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
337#define OPENMP_DOACROSS_MODIFIER(Name) \
338 case OMPC_DOACROSS_##Name: \
340#include "clang/Basic/OpenMPKinds.def"
342 llvm_unreachable(
"Invalid OpenMP 'doacross' clause type");
347#define OPENMP_LINEAR_KIND(Name) \
348 case OMPC_LINEAR_##Name: \
350#include "clang/Basic/OpenMPKinds.def"
352 llvm_unreachable(
"Invalid OpenMP 'linear' clause type");
358#define OPENMP_MAP_KIND(Name) \
359 case OMPC_MAP_##Name: \
361#define OPENMP_MAP_MODIFIER_KIND(Name) \
362 case OMPC_MAP_MODIFIER_##Name: \
364#include "clang/Basic/OpenMPKinds.def"
368 llvm_unreachable(
"Invalid OpenMP 'map' clause type");
374#define OPENMP_MOTION_MODIFIER_KIND(Name) \
375 case OMPC_MOTION_MODIFIER_##Name: \
377#include "clang/Basic/OpenMPKinds.def"
381 llvm_unreachable(
"Invalid OpenMP 'to' or 'from' clause type");
382 case OMPC_dist_schedule:
386#define OPENMP_DIST_SCHEDULE_KIND(Name) \
387 case OMPC_DIST_SCHEDULE_##Name: \
389#include "clang/Basic/OpenMPKinds.def"
391 llvm_unreachable(
"Invalid OpenMP 'dist_schedule' clause type");
392 case OMPC_defaultmap:
397#define OPENMP_DEFAULTMAP_KIND(Name) \
398 case OMPC_DEFAULTMAP_##Name: \
400#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
401 case OMPC_DEFAULTMAP_MODIFIER_##Name: \
403#include "clang/Basic/OpenMPKinds.def"
405 llvm_unreachable(
"Invalid OpenMP 'defaultmap' clause type");
406 case OMPC_atomic_default_mem_order:
410#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \
411 case OMPC_ATOMIC_DEFAULT_MEM_ORDER_##Name: \
413#include "clang/Basic/OpenMPKinds.def"
415 llvm_unreachable(
"Invalid OpenMP 'atomic_default_mem_order' clause type");
416 case OMPC_device_type:
420#define OPENMP_DEVICE_TYPE_KIND(Name) \
421 case OMPC_DEVICE_TYPE_##Name: \
423#include "clang/Basic/OpenMPKinds.def"
425 llvm_unreachable(
"Invalid OpenMP 'device_type' clause type");
430#define OPENMP_AT_KIND(Name) \
431 case OMPC_AT_##Name: \
433#include "clang/Basic/OpenMPKinds.def"
435 llvm_unreachable(
"Invalid OpenMP 'at' clause type");
440#define OPENMP_SEVERITY_KIND(Name) \
441 case OMPC_SEVERITY_##Name: \
443#include "clang/Basic/OpenMPKinds.def"
445 llvm_unreachable(
"Invalid OpenMP 'severity' clause type");
446 case OMPC_lastprivate:
450#define OPENMP_LASTPRIVATE_KIND(Name) \
451 case OMPC_LASTPRIVATE_##Name: \
453#include "clang/Basic/OpenMPKinds.def"
455 llvm_unreachable(
"Invalid OpenMP 'lastprivate' clause type");
461#define OPENMP_ORDER_KIND(Name) \
462 case OMPC_ORDER_##Name: \
464#define OPENMP_ORDER_MODIFIER(Name) \
465 case OMPC_ORDER_MODIFIER_##Name: \
467#include "clang/Basic/OpenMPKinds.def"
469 llvm_unreachable(
"Invalid OpenMP 'order' clause type");
474#define OPENMP_DEPEND_KIND(Name) \
475 case OMPC_DEPEND_##Name: \
477#include "clang/Basic/OpenMPKinds.def"
479 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
482 return getOpenMPClauseName(CK).data();
483 llvm_unreachable(
"Invalid OpenMP 'fail' clause modifier");
489#define OPENMP_DEVICE_MODIFIER(Name) \
490 case OMPC_DEVICE_##Name: \
492#include "clang/Basic/OpenMPKinds.def"
494 llvm_unreachable(
"Invalid OpenMP 'device' clause modifier");
499#define OPENMP_REDUCTION_MODIFIER(Name) \
500 case OMPC_REDUCTION_##Name: \
502#include "clang/Basic/OpenMPKinds.def"
504 llvm_unreachable(
"Invalid OpenMP 'reduction' clause modifier");
505 case OMPC_adjust_args:
509#define OPENMP_ADJUST_ARGS_KIND(Name) \
510 case OMPC_ADJUST_ARGS_##Name: \
512#include "clang/Basic/OpenMPKinds.def"
514 llvm_unreachable(
"Invalid OpenMP 'adjust_args' clause kind");
519#define OPENMP_BIND_KIND(Name) \
520 case OMPC_BIND_##Name: \
522#include "clang/Basic/OpenMPKinds.def"
524 llvm_unreachable(
"Invalid OpenMP 'bind' clause type");
529#define OPENMP_GRAINSIZE_MODIFIER(Name) \
530 case OMPC_GRAINSIZE_##Name: \
532#include "clang/Basic/OpenMPKinds.def"
534 llvm_unreachable(
"Invalid OpenMP 'grainsize' clause modifier");
539#define OPENMP_NUMTASKS_MODIFIER(Name) \
540 case OMPC_NUMTASKS_##Name: \
542#include "clang/Basic/OpenMPKinds.def"
544 llvm_unreachable(
"Invalid OpenMP 'num_tasks' clause modifier");
549#define OPENMP_ALLOCATE_MODIFIER(Name) \
550 case OMPC_ALLOCATE_##Name: \
552#include "clang/Basic/OpenMPKinds.def"
554 llvm_unreachable(
"Invalid OpenMP 'allocate' clause modifier");
555 case OMPC_num_threads:
559#define OPENMP_NUMTHREADS_MODIFIER(Name) \
560 case OMPC_NUMTHREADS_##Name: \
562#include "clang/Basic/OpenMPKinds.def"
564 llvm_unreachable(
"Invalid OpenMP 'num_threads' clause modifier");
566 case OMPC_threadprivate:
572 case OMPC_permutation:
576 case OMPC_firstprivate:
578 case OMPC_task_reduction:
579 case OMPC_in_reduction:
582 case OMPC_copyprivate:
601 case OMPC_thread_limit:
606 case OMPC_use_device_ptr:
607 case OMPC_use_device_addr:
608 case OMPC_is_device_ptr:
609 case OMPC_has_device_addr:
610 case OMPC_unified_address:
611 case OMPC_unified_shared_memory:
612 case OMPC_reverse_offload:
613 case OMPC_dynamic_allocators:
616 case OMPC_nontemporal:
619 case OMPC_novariants:
623 case OMPC_uses_allocators:
626 case OMPC_append_args:
631 llvm_unreachable(
"Invalid OpenMP simple clause kind");
635 return getDirectiveAssociation(DKind) == Association::Loop;
639 return DKind == OMPD_for || DKind == OMPD_for_simd ||
640 DKind == OMPD_sections || DKind == OMPD_section ||
641 DKind == OMPD_single || DKind == OMPD_parallel_for ||
642 DKind == OMPD_parallel_for_simd || DKind == OMPD_parallel_sections ||
643 DKind == OMPD_target_parallel_for ||
644 DKind == OMPD_distribute_parallel_for ||
645 DKind == OMPD_distribute_parallel_for_simd ||
646 DKind == OMPD_target_parallel_for_simd ||
647 DKind == OMPD_teams_distribute_parallel_for_simd ||
648 DKind == OMPD_teams_distribute_parallel_for ||
649 DKind == OMPD_target_teams_distribute_parallel_for ||
650 DKind == OMPD_target_teams_distribute_parallel_for_simd ||
651 DKind == OMPD_parallel_loop || DKind == OMPD_teams_loop ||
652 DKind == OMPD_target_parallel_loop || DKind == OMPD_target_teams_loop;
656 return DKind == OMPD_taskloop ||
657 llvm::is_contained(getLeafConstructs(DKind), OMPD_taskloop);
661 if (DKind == OMPD_teams_loop)
663 return DKind == OMPD_parallel ||
664 llvm::is_contained(getLeafConstructs(DKind), OMPD_parallel);
668 return DKind == OMPD_target ||
669 llvm::is_contained(getLeafConstructs(DKind), OMPD_target);
673 return DKind == OMPD_target_data || DKind == OMPD_target_enter_data ||
674 DKind == OMPD_target_exit_data || DKind == OMPD_target_update;
678 if (DKind == OMPD_teams)
681 return !Leaves.empty() && Leaves.front() == OMPD_teams;
685 return DKind == OMPD_teams ||
686 llvm::is_contained(getLeafConstructs(DKind), OMPD_teams);
691 if (getDirectiveAssociation(DKind) != Association::Loop)
696 return DKind == OMPD_simd ||
697 llvm::is_contained(getLeafConstructs(DKind), OMPD_simd);
701 if (Kind == OMPD_distribute)
704 return !Leaves.empty() && Leaves.front() == OMPD_distribute;
708 return Kind == OMPD_distribute ||
709 llvm::is_contained(getLeafConstructs(Kind), OMPD_distribute);
713 if (Kind == OMPD_loop)
716 return !Leaves.empty() && Leaves.back() == OMPD_loop;
720 return Kind == OMPC_private || Kind == OMPC_firstprivate ||
721 Kind == OMPC_lastprivate || Kind == OMPC_linear ||
722 Kind == OMPC_reduction || Kind == OMPC_task_reduction ||
723 Kind == OMPC_in_reduction;
727 return Kind == OMPC_threadprivate || Kind == OMPC_copyin;
735 return Kind == OMPD_distribute_parallel_for ||
736 Kind == OMPD_distribute_parallel_for_simd ||
737 Kind == OMPD_teams_distribute_parallel_for_simd ||
738 Kind == OMPD_teams_distribute_parallel_for ||
739 Kind == OMPD_target_teams_distribute_parallel_for ||
740 Kind == OMPD_target_teams_distribute_parallel_for_simd ||
741 Kind == OMPD_teams_loop || Kind == OMPD_target_teams_loop;
746 return DKind == OMPD_tile || DKind == OMPD_unroll || DKind == OMPD_reverse ||
747 DKind == OMPD_interchange || DKind == OMPD_stripe;
756 return DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd ||
757 DKind == OMPD_parallel_master ||
758 DKind == OMPD_parallel_master_taskloop ||
759 DKind == OMPD_parallel_master_taskloop_simd ||
760 DKind == OMPD_parallel_sections;
764 return DKind == OMPD_target || DKind == OMPD_target_parallel ||
765 DKind == OMPD_target_parallel_for ||
766 DKind == OMPD_target_parallel_for_simd || DKind == OMPD_target_simd ||
767 DKind == OMPD_target_parallel_loop;
771 if (DKind == OMPD_error)
773 Category Cat = getDirectiveCategory(DKind);
774 return Cat == Category::Executable || Cat == Category::Subsidiary;
778 if (DKind == OMPD_error)
780 Category Cat = getDirectiveCategory(DKind);
781 return Cat == Category::Informational;
790 case OMPD_cancellation_point:
808 case OMPD_metadirective:
823 if (DKind == OMPD_loop || DKind == OMPD_parallel || DKind == OMPD_simd ||
827 if (LangOpts.OpenMP >= 60)
828 return DKind == OMPD_atomic ||
837 assert(
unsigned(DKind) < llvm::omp::Directive_enumSize);
841 assert(isLeafConstruct(LKind) &&
"Epecting leaf directive");
844 case OMPD_metadirective:
845 CaptureRegions.push_back(OMPD_metadirective);
848 CaptureRegions.push_back(OMPD_nothing);
851 CaptureRegions.push_back(OMPD_parallel);
854 CaptureRegions.push_back(OMPD_task);
855 CaptureRegions.push_back(OMPD_target);
858 case OMPD_target_enter_data:
859 case OMPD_target_exit_data:
860 case OMPD_target_update:
861 CaptureRegions.push_back(OMPD_task);
864 CaptureRegions.push_back(OMPD_teams);
867 CaptureRegions.push_back(OMPD_taskloop);
874 if (!CaptureRegions.empty() &&
875 !llvm::is_contained(CaptureRegions, OMPD_parallel))
876 CaptureRegions.push_back(OMPD_parallel);
881 case OMPD_distribute:
888 case OMPD_target_data:
900 llvm::errs() << getOpenMPDirectiveName(LKind, llvm::omp::FallbackVersion)
902 llvm_unreachable(
"Unexpected directive");
907 bool MayNeedUnknownRegion =
false;
909 MayNeedUnknownRegion |= GetRegionsForLeaf(L);
914 if (CaptureRegions.empty() && MayNeedUnknownRegion)
915 CaptureRegions.push_back(OMPD_unknown);
919 assert((CaptureRegions[0] == OMPD_unknown ||
920 !llvm::is_contained(CaptureRegions, OMPD_unknown)) &&
921 "Misplaced OMPD_unknown");
925 return FailClauseParameter == llvm::omp::OMPC_acquire ||
926 FailClauseParameter == llvm::omp::OMPC_relaxed ||
927 FailClauseParameter == llvm::omp::OMPC_seq_cst;
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Defines some OpenMP-specific enums and functions.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
The base class of the type hierarchy.
The JSON file list parser is used to communicate input to InstallAPI.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
bool needsTaskBasedThreadLimit(OpenMPDirectiveKind DKind)
Checks if the specified target directive, combined or not, needs task based thread_limit.
bool isOpenMPNestingTeamsDirective(OpenMPDirectiveKind DKind)
Checks if the specified composite/combined directive constitutes a teams directive in the outermost n...
bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter)
Checks if the parameter to the fail clause in "#pragma atomic compare fail" is restricted only to mem...
bool isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a target data offload directive.
OpenMPDefaultClauseVariableCategory
OpenMP variable-category for 'default' clause.
@ OMPC_DEFAULT_VC_unknown
bool isOpenMPLoopTransformationDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a loop transformation directive.
@ OMPC_DEFAULTMAP_MODIFIER_last
@ OMPC_DEFAULTMAP_MODIFIER_unknown
@ OMPC_ORDER_MODIFIER_last
@ OMPC_ADJUST_ARGS_unknown
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
@ OMPC_DEVICE_TYPE_unknown
@ OMPC_SCHEDULE_MODIFIER_last
const char * getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type)
bool isOpenMPParallelDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a parallel-kind directive.
bool isOpenMPPrivate(OpenMPClauseKind Kind)
Checks if the specified clause is one of private clauses like 'private', 'firstprivate',...
@ OMPC_DIST_SCHEDULE_unknown
bool isOpenMPTaskingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of tasking directives - task, taskloop,...
bool isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a target code offload directive.
bool isOpenMPTeamsDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a teams-kind directive.
bool isOpenMPGenericLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive constitutes a 'loop' directive in the outermost nest.
@ OMPC_LASTPRIVATE_unknown
unsigned getOpenMPSimpleClauseType(OpenMPClauseKind Kind, llvm::StringRef Str, const LangOptions &LangOpts)
bool isOpenMPCanonicalLoopNestTransformationDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a loop transformation directive that applies to a canonical loop...
bool isOpenMPOrderConcurrentNestableDirective(OpenMPDirectiveKind DKind, const LangOptions &LangOpts)
Checks if the specified directive is an order concurrent nestable directive that can be nested within...
bool isOpenMPLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a directive with an associated loop construct.
bool isOpenMPCapturingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive can capture variables.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
@ OMPC_MOTION_MODIFIER_unknown
@ OMPC_DEFAULTMAP_unknown
bool isOpenMPThreadPrivate(OpenMPClauseKind Kind)
Checks if the specified clause is one of threadprivate clauses like 'threadprivate',...
bool isOpenMPExecutableDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is considered as "executable".
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
bool isOpenMPInformationalDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is considered as "informational".
bool isOpenMPSimdDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a simd directive.
void getOpenMPCaptureRegions(llvm::SmallVectorImpl< OpenMPDirectiveKind > &CaptureRegions, OpenMPDirectiveKind DKind)
Return the captured regions of an OpenMP directive.
@ OMPC_NUMTHREADS_unknown
@ OMPC_ATOMIC_DEFAULT_MEM_ORDER_unknown
const char * getOpenMPDefaultVariableCategoryName(unsigned VC)
@ OMPC_MAP_MODIFIER_unknown
bool isOpenMPCombinedParallelADirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a combined construct for which the first construct is a parallel...
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
bool isOpenMPNestingDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified composite/combined directive constitutes a distribute directive in the outerm...
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
OpenMPDefaultClauseVariableCategory getOpenMPDefaultVariableCategory(StringRef Str, const LangOptions &LangOpts)