15#include "llvm/ADT/StringRef.h"
16#include "llvm/ADT/StringSwitch.h"
17#include "llvm/Support/ErrorHandling.h"
21using namespace llvm::omp;
27 return llvm::StringSwitch<unsigned>(Str)
28#define OMP_DEFAULT_KIND(Enum, Name) .Case(Name, unsigned(Enum))
29#include "llvm/Frontend/OpenMP/OMPKinds.def"
30 .Default(
unsigned(llvm::omp::OMP_DEFAULT_unknown));
32 return llvm::StringSwitch<unsigned>(Str)
33#define OMP_PROC_BIND_KIND(Enum, Name, Value) .Case(Name, Value)
34#include "llvm/Frontend/OpenMP/OMPKinds.def"
35 .Default(
unsigned(llvm::omp::OMP_PROC_BIND_unknown));
37 return llvm::StringSwitch<unsigned>(Str)
38#define OPENMP_SCHEDULE_KIND(Name) \
39 .Case(#Name, static_cast<unsigned>(OMPC_SCHEDULE_##Name))
40#define OPENMP_SCHEDULE_MODIFIER(Name) \
41 .Case(#Name, static_cast<unsigned>(OMPC_SCHEDULE_MODIFIER_##Name))
42#include "clang/Basic/OpenMPKinds.def"
45 unsigned Type = llvm::StringSwitch<unsigned>(Str)
46#define OPENMP_DEPEND_KIND(Name) .Case(#Name, OMPC_DEPEND_##Name)
47#include "clang/Basic/OpenMPKinds.def"
49 if (LangOpts.OpenMP < 51 &&
Type == OMPC_DEPEND_inoutset)
54 return llvm::StringSwitch<OpenMPDoacrossClauseModifier>(Str)
55#define OPENMP_DOACROSS_MODIFIER(Name) .Case(#Name, OMPC_DOACROSS_##Name)
56#include "clang/Basic/OpenMPKinds.def"
59 return llvm::StringSwitch<OpenMPLinearClauseKind>(Str)
60#define OPENMP_LINEAR_KIND(Name) .Case(#Name, OMPC_LINEAR_##Name)
61#include "clang/Basic/OpenMPKinds.def"
64 unsigned Type = llvm::StringSwitch<unsigned>(Str)
65#define OPENMP_MAP_KIND(Name) \
66 .Case(#Name, static_cast<unsigned>(OMPC_MAP_##Name))
67#define OPENMP_MAP_MODIFIER_KIND(Name) \
68 .Case(#Name, static_cast<unsigned>(OMPC_MAP_MODIFIER_##Name))
69#include "clang/Basic/OpenMPKinds.def"
71 if (LangOpts.OpenMP < 51 &&
Type == OMPC_MAP_MODIFIER_present)
73 if (!LangOpts.OpenMPExtensions &&
Type == OMPC_MAP_MODIFIER_ompx_hold)
79 unsigned Type = llvm::StringSwitch<unsigned>(Str)
80#define OPENMP_MOTION_MODIFIER_KIND(Name) \
81 .Case(#Name, static_cast<unsigned>(OMPC_MOTION_MODIFIER_##Name))
82#include "clang/Basic/OpenMPKinds.def"
84 if (LangOpts.OpenMP < 51 &&
Type == OMPC_MOTION_MODIFIER_present)
88 case OMPC_dist_schedule:
89 return llvm::StringSwitch<OpenMPDistScheduleClauseKind>(Str)
90#define OPENMP_DIST_SCHEDULE_KIND(Name) .Case(#Name, OMPC_DIST_SCHEDULE_##Name)
91#include "clang/Basic/OpenMPKinds.def"
94 return llvm::StringSwitch<unsigned>(Str)
95#define OPENMP_DEFAULTMAP_KIND(Name) \
96 .Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_##Name))
97#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
98 .Case(#Name, static_cast<unsigned>(OMPC_DEFAULTMAP_MODIFIER_##Name))
99#include "clang/Basic/OpenMPKinds.def"
101 case OMPC_atomic_default_mem_order:
102 return llvm::StringSwitch<OpenMPAtomicDefaultMemOrderClauseKind>(Str)
103#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \
104 .Case(#Name, OMPC_ATOMIC_DEFAULT_MEM_ORDER_##Name)
105#include "clang/Basic/OpenMPKinds.def"
108 return static_cast<unsigned int>(llvm::StringSwitch<llvm::omp::Clause>(Str)
109#define OPENMP_ATOMIC_FAIL_MODIFIER(Name) .Case(#Name, OMPC_##Name)
110#include "clang/Basic/OpenMPKinds.def"
111 .Default(OMPC_unknown));
112 case OMPC_device_type:
113 return llvm::StringSwitch<OpenMPDeviceType>(Str)
114#define OPENMP_DEVICE_TYPE_KIND(Name) .Case(#Name, OMPC_DEVICE_TYPE_##Name)
115#include "clang/Basic/OpenMPKinds.def"
118 return llvm::StringSwitch<OpenMPAtClauseKind>(Str)
119#define OPENMP_AT_KIND(Name) .Case(#Name, OMPC_AT_##Name)
120#include "clang/Basic/OpenMPKinds.def"
123 return llvm::StringSwitch<OpenMPSeverityClauseKind>(Str)
124#define OPENMP_SEVERITY_KIND(Name) .Case(#Name, OMPC_SEVERITY_##Name)
125#include "clang/Basic/OpenMPKinds.def"
127 case OMPC_lastprivate:
128 return llvm::StringSwitch<OpenMPLastprivateModifier>(Str)
129#define OPENMP_LASTPRIVATE_KIND(Name) .Case(#Name, OMPC_LASTPRIVATE_##Name)
130#include "clang/Basic/OpenMPKinds.def"
133 return llvm::StringSwitch<unsigned>(Str)
134#define OPENMP_ORDER_KIND(Name) \
135 .Case(#Name, static_cast<unsigned>(OMPC_ORDER_##Name))
136#define OPENMP_ORDER_MODIFIER(Name) \
137 .Case(#Name, static_cast<unsigned>(OMPC_ORDER_MODIFIER_##Name))
138#include "clang/Basic/OpenMPKinds.def"
141 return llvm::StringSwitch<OpenMPDependClauseKind>(Str)
142#define OPENMP_DEPEND_KIND(Name) .Case(#Name, OMPC_DEPEND_##Name)
143#include "clang/Basic/OpenMPKinds.def"
146 return llvm::StringSwitch<OpenMPDeviceClauseModifier>(Str)
147#define OPENMP_DEVICE_MODIFIER(Name) .Case(#Name, OMPC_DEVICE_##Name)
148#include "clang/Basic/OpenMPKinds.def"
151 return llvm::StringSwitch<OpenMPReductionClauseModifier>(Str)
152#define OPENMP_REDUCTION_MODIFIER(Name) .Case(#Name, OMPC_REDUCTION_##Name)
153#include "clang/Basic/OpenMPKinds.def"
155 case OMPC_adjust_args:
156 return llvm::StringSwitch<OpenMPAdjustArgsOpKind>(Str)
157#define OPENMP_ADJUST_ARGS_KIND(Name) .Case(#Name, OMPC_ADJUST_ARGS_##Name)
158#include "clang/Basic/OpenMPKinds.def"
161 return llvm::StringSwitch<unsigned>(Str)
162#define OPENMP_BIND_KIND(Name) .Case(#Name, OMPC_BIND_##Name)
163#include "clang/Basic/OpenMPKinds.def"
165 case OMPC_grainsize: {
166 unsigned Type = llvm::StringSwitch<unsigned>(Str)
167#define OPENMP_GRAINSIZE_MODIFIER(Name) .Case(#Name, OMPC_GRAINSIZE_##Name)
168#include "clang/Basic/OpenMPKinds.def"
170 if (LangOpts.OpenMP < 51)
174 case OMPC_num_tasks: {
175 unsigned Type = llvm::StringSwitch<unsigned>(Str)
176#define OPENMP_NUMTASKS_MODIFIER(Name) .Case(#Name, OMPC_NUMTASKS_##Name)
177#include "clang/Basic/OpenMPKinds.def"
179 if (LangOpts.OpenMP < 51)
184 return llvm::StringSwitch<OpenMPAllocateClauseModifier>(Str)
185#define OPENMP_ALLOCATE_MODIFIER(Name) .Case(#Name, OMPC_ALLOCATE_##Name)
186#include "clang/Basic/OpenMPKinds.def"
189 case OMPC_threadprivate:
192 case OMPC_num_threads:
196 case OMPC_permutation:
200 case OMPC_firstprivate:
202 case OMPC_task_reduction:
203 case OMPC_in_reduction:
206 case OMPC_copyprivate:
225 case OMPC_thread_limit:
230 case OMPC_use_device_ptr:
231 case OMPC_use_device_addr:
232 case OMPC_is_device_ptr:
233 case OMPC_has_device_addr:
234 case OMPC_unified_address:
235 case OMPC_unified_shared_memory:
236 case OMPC_reverse_offload:
237 case OMPC_dynamic_allocators:
239 case OMPC_nontemporal:
241 case OMPC_novariants:
246 case OMPC_uses_allocators:
249 case OMPC_append_args:
254 llvm_unreachable(
"Invalid OpenMP simple clause kind");
261 switch (llvm::omp::DefaultKind(
Type)) {
262#define OMP_DEFAULT_KIND(Enum, Name) \
265#include "llvm/Frontend/OpenMP/OMPKinds.def"
267 llvm_unreachable(
"Invalid OpenMP 'default' clause type");
270#define OMP_PROC_BIND_KIND(Enum, Name, Value) \
273#include "llvm/Frontend/OpenMP/OMPKinds.def"
275 llvm_unreachable(
"Invalid OpenMP 'proc_bind' clause type");
281#define OPENMP_SCHEDULE_KIND(Name) \
282 case OMPC_SCHEDULE_##Name: \
284#define OPENMP_SCHEDULE_MODIFIER(Name) \
285 case OMPC_SCHEDULE_MODIFIER_##Name: \
287#include "clang/Basic/OpenMPKinds.def"
289 llvm_unreachable(
"Invalid OpenMP 'schedule' clause type");
294#define OPENMP_DEPEND_KIND(Name) \
295 case OMPC_DEPEND_##Name: \
297#include "clang/Basic/OpenMPKinds.def"
299 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
304#define OPENMP_DOACROSS_MODIFIER(Name) \
305 case OMPC_DOACROSS_##Name: \
307#include "clang/Basic/OpenMPKinds.def"
309 llvm_unreachable(
"Invalid OpenMP 'doacross' clause type");
314#define OPENMP_LINEAR_KIND(Name) \
315 case OMPC_LINEAR_##Name: \
317#include "clang/Basic/OpenMPKinds.def"
319 llvm_unreachable(
"Invalid OpenMP 'linear' clause type");
325#define OPENMP_MAP_KIND(Name) \
326 case OMPC_MAP_##Name: \
328#define OPENMP_MAP_MODIFIER_KIND(Name) \
329 case OMPC_MAP_MODIFIER_##Name: \
331#include "clang/Basic/OpenMPKinds.def"
335 llvm_unreachable(
"Invalid OpenMP 'map' clause type");
341#define OPENMP_MOTION_MODIFIER_KIND(Name) \
342 case OMPC_MOTION_MODIFIER_##Name: \
344#include "clang/Basic/OpenMPKinds.def"
348 llvm_unreachable(
"Invalid OpenMP 'to' or 'from' clause type");
349 case OMPC_dist_schedule:
353#define OPENMP_DIST_SCHEDULE_KIND(Name) \
354 case OMPC_DIST_SCHEDULE_##Name: \
356#include "clang/Basic/OpenMPKinds.def"
358 llvm_unreachable(
"Invalid OpenMP 'dist_schedule' clause type");
359 case OMPC_defaultmap:
364#define OPENMP_DEFAULTMAP_KIND(Name) \
365 case OMPC_DEFAULTMAP_##Name: \
367#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
368 case OMPC_DEFAULTMAP_MODIFIER_##Name: \
370#include "clang/Basic/OpenMPKinds.def"
372 llvm_unreachable(
"Invalid OpenMP 'schedule' clause type");
373 case OMPC_atomic_default_mem_order:
377#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \
378 case OMPC_ATOMIC_DEFAULT_MEM_ORDER_##Name: \
380#include "clang/Basic/OpenMPKinds.def"
382 llvm_unreachable(
"Invalid OpenMP 'atomic_default_mem_order' clause type");
383 case OMPC_device_type:
387#define OPENMP_DEVICE_TYPE_KIND(Name) \
388 case OMPC_DEVICE_TYPE_##Name: \
390#include "clang/Basic/OpenMPKinds.def"
392 llvm_unreachable(
"Invalid OpenMP 'device_type' clause type");
397#define OPENMP_AT_KIND(Name) \
398 case OMPC_AT_##Name: \
400#include "clang/Basic/OpenMPKinds.def"
402 llvm_unreachable(
"Invalid OpenMP 'at' clause type");
407#define OPENMP_SEVERITY_KIND(Name) \
408 case OMPC_SEVERITY_##Name: \
410#include "clang/Basic/OpenMPKinds.def"
412 llvm_unreachable(
"Invalid OpenMP 'severity' clause type");
413 case OMPC_lastprivate:
417#define OPENMP_LASTPRIVATE_KIND(Name) \
418 case OMPC_LASTPRIVATE_##Name: \
420#include "clang/Basic/OpenMPKinds.def"
422 llvm_unreachable(
"Invalid OpenMP 'lastprivate' clause type");
428#define OPENMP_ORDER_KIND(Name) \
429 case OMPC_ORDER_##Name: \
431#define OPENMP_ORDER_MODIFIER(Name) \
432 case OMPC_ORDER_MODIFIER_##Name: \
434#include "clang/Basic/OpenMPKinds.def"
436 llvm_unreachable(
"Invalid OpenMP 'order' clause type");
441#define OPENMP_DEPEND_KIND(Name) \
442 case OMPC_DEPEND_##Name: \
444#include "clang/Basic/OpenMPKinds.def"
446 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
449 return getOpenMPClauseName(CK).data();
450 llvm_unreachable(
"Invalid OpenMP 'fail' clause modifier");
456#define OPENMP_DEVICE_MODIFIER(Name) \
457 case OMPC_DEVICE_##Name: \
459#include "clang/Basic/OpenMPKinds.def"
461 llvm_unreachable(
"Invalid OpenMP 'device' clause modifier");
466#define OPENMP_REDUCTION_MODIFIER(Name) \
467 case OMPC_REDUCTION_##Name: \
469#include "clang/Basic/OpenMPKinds.def"
471 llvm_unreachable(
"Invalid OpenMP 'reduction' clause modifier");
472 case OMPC_adjust_args:
476#define OPENMP_ADJUST_ARGS_KIND(Name) \
477 case OMPC_ADJUST_ARGS_##Name: \
479#include "clang/Basic/OpenMPKinds.def"
481 llvm_unreachable(
"Invalid OpenMP 'adjust_args' clause kind");
486#define OPENMP_BIND_KIND(Name) \
487 case OMPC_BIND_##Name: \
489#include "clang/Basic/OpenMPKinds.def"
491 llvm_unreachable(
"Invalid OpenMP 'bind' clause type");
496#define OPENMP_GRAINSIZE_MODIFIER(Name) \
497 case OMPC_GRAINSIZE_##Name: \
499#include "clang/Basic/OpenMPKinds.def"
501 llvm_unreachable(
"Invalid OpenMP 'grainsize' clause modifier");
506#define OPENMP_NUMTASKS_MODIFIER(Name) \
507 case OMPC_NUMTASKS_##Name: \
509#include "clang/Basic/OpenMPKinds.def"
511 llvm_unreachable(
"Invalid OpenMP 'num_tasks' clause modifier");
516#define OPENMP_ALLOCATE_MODIFIER(Name) \
517 case OMPC_ALLOCATE_##Name: \
519#include "clang/Basic/OpenMPKinds.def"
521 llvm_unreachable(
"Invalid OpenMP 'allocate' clause modifier");
523 case OMPC_threadprivate:
526 case OMPC_num_threads:
530 case OMPC_permutation:
534 case OMPC_firstprivate:
536 case OMPC_task_reduction:
537 case OMPC_in_reduction:
540 case OMPC_copyprivate:
559 case OMPC_thread_limit:
564 case OMPC_use_device_ptr:
565 case OMPC_use_device_addr:
566 case OMPC_is_device_ptr:
567 case OMPC_has_device_addr:
568 case OMPC_unified_address:
569 case OMPC_unified_shared_memory:
570 case OMPC_reverse_offload:
571 case OMPC_dynamic_allocators:
573 case OMPC_nontemporal:
576 case OMPC_novariants:
580 case OMPC_uses_allocators:
583 case OMPC_append_args:
588 llvm_unreachable(
"Invalid OpenMP simple clause kind");
592 return getDirectiveAssociation(DKind) == Association::Loop;
596 return DKind == OMPD_for || DKind == OMPD_for_simd ||
597 DKind == OMPD_sections || DKind == OMPD_section ||
598 DKind == OMPD_single || DKind == OMPD_parallel_for ||
599 DKind == OMPD_parallel_for_simd || DKind == OMPD_parallel_sections ||
600 DKind == OMPD_target_parallel_for ||
601 DKind == OMPD_distribute_parallel_for ||
602 DKind == OMPD_distribute_parallel_for_simd ||
603 DKind == OMPD_target_parallel_for_simd ||
604 DKind == OMPD_teams_distribute_parallel_for_simd ||
605 DKind == OMPD_teams_distribute_parallel_for ||
606 DKind == OMPD_target_teams_distribute_parallel_for ||
607 DKind == OMPD_target_teams_distribute_parallel_for_simd ||
608 DKind == OMPD_parallel_loop || DKind == OMPD_teams_loop ||
609 DKind == OMPD_target_parallel_loop || DKind == OMPD_target_teams_loop;
613 return DKind == OMPD_taskloop ||
614 llvm::is_contained(getLeafConstructs(DKind), OMPD_taskloop);
618 if (DKind == OMPD_teams_loop)
620 return DKind == OMPD_parallel ||
621 llvm::is_contained(getLeafConstructs(DKind), OMPD_parallel);
625 return DKind == OMPD_target ||
626 llvm::is_contained(getLeafConstructs(DKind), OMPD_target);
630 return DKind == OMPD_target_data || DKind == OMPD_target_enter_data ||
631 DKind == OMPD_target_exit_data || DKind == OMPD_target_update;
635 if (DKind == OMPD_teams)
638 return !Leaves.empty() && Leaves.front() == OMPD_teams;
642 return DKind == OMPD_teams ||
643 llvm::is_contained(getLeafConstructs(DKind), OMPD_teams);
648 if (getDirectiveAssociation(DKind) != Association::Loop)
653 return DKind == OMPD_simd ||
654 llvm::is_contained(getLeafConstructs(DKind), OMPD_simd);
658 if (Kind == OMPD_distribute)
661 return !Leaves.empty() && Leaves.front() == OMPD_distribute;
665 return Kind == OMPD_distribute ||
666 llvm::is_contained(getLeafConstructs(Kind), OMPD_distribute);
670 if (Kind == OMPD_loop)
673 return !Leaves.empty() && Leaves.back() == OMPD_loop;
677 return Kind == OMPC_private || Kind == OMPC_firstprivate ||
678 Kind == OMPC_lastprivate || Kind == OMPC_linear ||
679 Kind == OMPC_reduction || Kind == OMPC_task_reduction ||
680 Kind == OMPC_in_reduction;
684 return Kind == OMPC_threadprivate || Kind == OMPC_copyin;
692 return Kind == OMPD_distribute_parallel_for ||
693 Kind == OMPD_distribute_parallel_for_simd ||
694 Kind == OMPD_teams_distribute_parallel_for_simd ||
695 Kind == OMPD_teams_distribute_parallel_for ||
696 Kind == OMPD_target_teams_distribute_parallel_for ||
697 Kind == OMPD_target_teams_distribute_parallel_for_simd ||
698 Kind == OMPD_teams_loop || Kind == OMPD_target_teams_loop;
702 return DKind == OMPD_tile || DKind == OMPD_unroll || DKind == OMPD_reverse ||
703 DKind == OMPD_interchange;
707 return DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd ||
708 DKind == OMPD_parallel_master ||
709 DKind == OMPD_parallel_master_taskloop ||
710 DKind == OMPD_parallel_master_taskloop_simd ||
711 DKind == OMPD_parallel_sections;
715 return DKind == OMPD_target || DKind == OMPD_target_parallel ||
716 DKind == OMPD_target_parallel_for ||
717 DKind == OMPD_target_parallel_for_simd || DKind == OMPD_target_simd ||
718 DKind == OMPD_target_parallel_loop;
722 if (DKind == OMPD_error)
724 Category Cat = getDirectiveCategory(DKind);
725 return Cat == Category::Executable || Cat == Category::Subsidiary;
729 if (DKind == OMPD_error)
731 Category Cat = getDirectiveCategory(DKind);
732 return Cat == Category::Informational;
741 case OMPD_cancellation_point:
759 case OMPD_metadirective:
771 assert(
unsigned(DKind) < llvm::omp::Directive_enumSize);
775 assert(isLeafConstruct(LKind) &&
"Epecting leaf directive");
778 case OMPD_metadirective:
779 CaptureRegions.push_back(OMPD_metadirective);
782 CaptureRegions.push_back(OMPD_nothing);
785 CaptureRegions.push_back(OMPD_parallel);
788 CaptureRegions.push_back(OMPD_task);
789 CaptureRegions.push_back(OMPD_target);
792 case OMPD_target_enter_data:
793 case OMPD_target_exit_data:
794 case OMPD_target_update:
795 CaptureRegions.push_back(OMPD_task);
798 CaptureRegions.push_back(OMPD_teams);
801 CaptureRegions.push_back(OMPD_taskloop);
808 if (!CaptureRegions.empty() &&
809 !llvm::is_contained(CaptureRegions, OMPD_parallel))
810 CaptureRegions.push_back(OMPD_parallel);
815 case OMPD_distribute:
822 case OMPD_target_data:
833 llvm::errs() << getOpenMPDirectiveName(LKind) <<
'\n';
834 llvm_unreachable(
"Unexpected directive");
839 bool MayNeedUnknownRegion =
false;
841 MayNeedUnknownRegion |= GetRegionsForLeaf(L);
846 if (CaptureRegions.empty() && MayNeedUnknownRegion)
847 CaptureRegions.push_back(OMPD_unknown);
851 assert((CaptureRegions[0] == OMPD_unknown ||
852 !llvm::is_contained(CaptureRegions, OMPD_unknown)) &&
853 "Misplaced OMPD_unknown");
857 return FailClauseParameter == llvm::omp::OMPC_acquire ||
858 FailClauseParameter == llvm::omp::OMPC_relaxed ||
859 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.
bool isOpenMPLoopTransformationDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a loop transformation directive.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
@ OMPC_DEFAULTMAP_MODIFIER_last
@ 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
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
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 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".
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_ATOMIC_DEFAULT_MEM_ORDER_unknown
@ 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...
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.