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 case OMPC_threadprivate:
187 case OMPC_num_threads:
195 case OMPC_firstprivate:
197 case OMPC_task_reduction:
198 case OMPC_in_reduction:
201 case OMPC_copyprivate:
220 case OMPC_thread_limit:
225 case OMPC_use_device_ptr:
226 case OMPC_use_device_addr:
227 case OMPC_is_device_ptr:
228 case OMPC_has_device_addr:
229 case OMPC_unified_address:
230 case OMPC_unified_shared_memory:
231 case OMPC_reverse_offload:
232 case OMPC_dynamic_allocators:
234 case OMPC_nontemporal:
236 case OMPC_novariants:
241 case OMPC_uses_allocators:
244 case OMPC_append_args:
249 llvm_unreachable(
"Invalid OpenMP simple clause kind");
256 switch (llvm::omp::DefaultKind(
Type)) {
257#define OMP_DEFAULT_KIND(Enum, Name) \
260#include "llvm/Frontend/OpenMP/OMPKinds.def"
262 llvm_unreachable(
"Invalid OpenMP 'default' clause type");
265#define OMP_PROC_BIND_KIND(Enum, Name, Value) \
268#include "llvm/Frontend/OpenMP/OMPKinds.def"
270 llvm_unreachable(
"Invalid OpenMP 'proc_bind' clause type");
276#define OPENMP_SCHEDULE_KIND(Name) \
277 case OMPC_SCHEDULE_##Name: \
279#define OPENMP_SCHEDULE_MODIFIER(Name) \
280 case OMPC_SCHEDULE_MODIFIER_##Name: \
282#include "clang/Basic/OpenMPKinds.def"
284 llvm_unreachable(
"Invalid OpenMP 'schedule' clause type");
289#define OPENMP_DEPEND_KIND(Name) \
290 case OMPC_DEPEND_##Name: \
292#include "clang/Basic/OpenMPKinds.def"
294 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
299#define OPENMP_DOACROSS_MODIFIER(Name) \
300 case OMPC_DOACROSS_##Name: \
302#include "clang/Basic/OpenMPKinds.def"
304 llvm_unreachable(
"Invalid OpenMP 'doacross' clause type");
309#define OPENMP_LINEAR_KIND(Name) \
310 case OMPC_LINEAR_##Name: \
312#include "clang/Basic/OpenMPKinds.def"
314 llvm_unreachable(
"Invalid OpenMP 'linear' clause type");
320#define OPENMP_MAP_KIND(Name) \
321 case OMPC_MAP_##Name: \
323#define OPENMP_MAP_MODIFIER_KIND(Name) \
324 case OMPC_MAP_MODIFIER_##Name: \
326#include "clang/Basic/OpenMPKinds.def"
330 llvm_unreachable(
"Invalid OpenMP 'map' clause type");
336#define OPENMP_MOTION_MODIFIER_KIND(Name) \
337 case OMPC_MOTION_MODIFIER_##Name: \
339#include "clang/Basic/OpenMPKinds.def"
343 llvm_unreachable(
"Invalid OpenMP 'to' or 'from' clause type");
344 case OMPC_dist_schedule:
348#define OPENMP_DIST_SCHEDULE_KIND(Name) \
349 case OMPC_DIST_SCHEDULE_##Name: \
351#include "clang/Basic/OpenMPKinds.def"
353 llvm_unreachable(
"Invalid OpenMP 'dist_schedule' clause type");
354 case OMPC_defaultmap:
359#define OPENMP_DEFAULTMAP_KIND(Name) \
360 case OMPC_DEFAULTMAP_##Name: \
362#define OPENMP_DEFAULTMAP_MODIFIER(Name) \
363 case OMPC_DEFAULTMAP_MODIFIER_##Name: \
365#include "clang/Basic/OpenMPKinds.def"
367 llvm_unreachable(
"Invalid OpenMP 'schedule' clause type");
368 case OMPC_atomic_default_mem_order:
372#define OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(Name) \
373 case OMPC_ATOMIC_DEFAULT_MEM_ORDER_##Name: \
375#include "clang/Basic/OpenMPKinds.def"
377 llvm_unreachable(
"Invalid OpenMP 'atomic_default_mem_order' clause type");
378 case OMPC_device_type:
382#define OPENMP_DEVICE_TYPE_KIND(Name) \
383 case OMPC_DEVICE_TYPE_##Name: \
385#include "clang/Basic/OpenMPKinds.def"
387 llvm_unreachable(
"Invalid OpenMP 'device_type' clause type");
392#define OPENMP_AT_KIND(Name) \
393 case OMPC_AT_##Name: \
395#include "clang/Basic/OpenMPKinds.def"
397 llvm_unreachable(
"Invalid OpenMP 'at' clause type");
402#define OPENMP_SEVERITY_KIND(Name) \
403 case OMPC_SEVERITY_##Name: \
405#include "clang/Basic/OpenMPKinds.def"
407 llvm_unreachable(
"Invalid OpenMP 'severity' clause type");
408 case OMPC_lastprivate:
412#define OPENMP_LASTPRIVATE_KIND(Name) \
413 case OMPC_LASTPRIVATE_##Name: \
415#include "clang/Basic/OpenMPKinds.def"
417 llvm_unreachable(
"Invalid OpenMP 'lastprivate' clause type");
423#define OPENMP_ORDER_KIND(Name) \
424 case OMPC_ORDER_##Name: \
426#define OPENMP_ORDER_MODIFIER(Name) \
427 case OMPC_ORDER_MODIFIER_##Name: \
429#include "clang/Basic/OpenMPKinds.def"
431 llvm_unreachable(
"Invalid OpenMP 'order' clause type");
436#define OPENMP_DEPEND_KIND(Name) \
437 case OMPC_DEPEND_##Name: \
439#include "clang/Basic/OpenMPKinds.def"
441 llvm_unreachable(
"Invalid OpenMP 'depend' clause type");
444 return getOpenMPClauseName(CK).data();
445 llvm_unreachable(
"Invalid OpenMP 'fail' clause modifier");
451#define OPENMP_DEVICE_MODIFIER(Name) \
452 case OMPC_DEVICE_##Name: \
454#include "clang/Basic/OpenMPKinds.def"
456 llvm_unreachable(
"Invalid OpenMP 'device' clause modifier");
461#define OPENMP_REDUCTION_MODIFIER(Name) \
462 case OMPC_REDUCTION_##Name: \
464#include "clang/Basic/OpenMPKinds.def"
466 llvm_unreachable(
"Invalid OpenMP 'reduction' clause modifier");
467 case OMPC_adjust_args:
471#define OPENMP_ADJUST_ARGS_KIND(Name) \
472 case OMPC_ADJUST_ARGS_##Name: \
474#include "clang/Basic/OpenMPKinds.def"
476 llvm_unreachable(
"Invalid OpenMP 'adjust_args' clause kind");
481#define OPENMP_BIND_KIND(Name) \
482 case OMPC_BIND_##Name: \
484#include "clang/Basic/OpenMPKinds.def"
486 llvm_unreachable(
"Invalid OpenMP 'bind' clause type");
491#define OPENMP_GRAINSIZE_MODIFIER(Name) \
492 case OMPC_GRAINSIZE_##Name: \
494#include "clang/Basic/OpenMPKinds.def"
496 llvm_unreachable(
"Invalid OpenMP 'grainsize' clause modifier");
501#define OPENMP_NUMTASKS_MODIFIER(Name) \
502 case OMPC_NUMTASKS_##Name: \
504#include "clang/Basic/OpenMPKinds.def"
506 llvm_unreachable(
"Invalid OpenMP 'num_tasks' clause modifier");
508 case OMPC_threadprivate:
511 case OMPC_num_threads:
519 case OMPC_firstprivate:
521 case OMPC_task_reduction:
522 case OMPC_in_reduction:
525 case OMPC_copyprivate:
544 case OMPC_thread_limit:
549 case OMPC_use_device_ptr:
550 case OMPC_use_device_addr:
551 case OMPC_is_device_ptr:
552 case OMPC_has_device_addr:
553 case OMPC_unified_address:
554 case OMPC_unified_shared_memory:
555 case OMPC_reverse_offload:
556 case OMPC_dynamic_allocators:
558 case OMPC_nontemporal:
561 case OMPC_novariants:
565 case OMPC_uses_allocators:
568 case OMPC_append_args:
573 llvm_unreachable(
"Invalid OpenMP simple clause kind");
577 return getDirectiveAssociation(DKind) == Association::Loop;
581 return DKind == OMPD_for || DKind == OMPD_for_simd ||
582 DKind == OMPD_sections || DKind == OMPD_section ||
583 DKind == OMPD_single || DKind == OMPD_parallel_for ||
584 DKind == OMPD_parallel_for_simd || DKind == OMPD_parallel_sections ||
585 DKind == OMPD_target_parallel_for ||
586 DKind == OMPD_distribute_parallel_for ||
587 DKind == OMPD_distribute_parallel_for_simd ||
588 DKind == OMPD_target_parallel_for_simd ||
589 DKind == OMPD_teams_distribute_parallel_for_simd ||
590 DKind == OMPD_teams_distribute_parallel_for ||
591 DKind == OMPD_target_teams_distribute_parallel_for ||
592 DKind == OMPD_target_teams_distribute_parallel_for_simd ||
593 DKind == OMPD_parallel_loop || DKind == OMPD_teams_loop ||
594 DKind == OMPD_target_parallel_loop || DKind == OMPD_target_teams_loop;
598 return DKind == OMPD_taskloop ||
599 llvm::is_contained(getLeafConstructs(DKind), OMPD_taskloop);
603 if (DKind == OMPD_teams_loop)
605 return DKind == OMPD_parallel ||
606 llvm::is_contained(getLeafConstructs(DKind), OMPD_parallel);
610 return DKind == OMPD_target ||
611 llvm::is_contained(getLeafConstructs(DKind), OMPD_target);
615 return DKind == OMPD_target_data || DKind == OMPD_target_enter_data ||
616 DKind == OMPD_target_exit_data || DKind == OMPD_target_update;
620 if (DKind == OMPD_teams)
623 return !Leaves.empty() && Leaves.front() == OMPD_teams;
627 return DKind == OMPD_teams ||
628 llvm::is_contained(getLeafConstructs(DKind), OMPD_teams);
633 if (getDirectiveAssociation(DKind) != Association::Loop)
638 return DKind == OMPD_simd ||
639 llvm::is_contained(getLeafConstructs(DKind), OMPD_simd);
643 if (Kind == OMPD_distribute)
646 return !Leaves.empty() && Leaves.front() == OMPD_distribute;
650 return Kind == OMPD_distribute ||
651 llvm::is_contained(getLeafConstructs(Kind), OMPD_distribute);
655 if (Kind == OMPD_loop)
658 return !Leaves.empty() && Leaves.back() == OMPD_loop;
662 return Kind == OMPC_private || Kind == OMPC_firstprivate ||
663 Kind == OMPC_lastprivate || Kind == OMPC_linear ||
664 Kind == OMPC_reduction || Kind == OMPC_task_reduction ||
665 Kind == OMPC_in_reduction;
669 return Kind == OMPC_threadprivate || Kind == OMPC_copyin;
677 return Kind == OMPD_distribute_parallel_for ||
678 Kind == OMPD_distribute_parallel_for_simd ||
679 Kind == OMPD_teams_distribute_parallel_for_simd ||
680 Kind == OMPD_teams_distribute_parallel_for ||
681 Kind == OMPD_target_teams_distribute_parallel_for ||
682 Kind == OMPD_target_teams_distribute_parallel_for_simd ||
683 Kind == OMPD_teams_loop || Kind == OMPD_target_teams_loop;
687 return DKind == OMPD_tile || DKind == OMPD_unroll;
691 return DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd ||
692 DKind == OMPD_parallel_master ||
693 DKind == OMPD_parallel_master_taskloop ||
694 DKind == OMPD_parallel_master_taskloop_simd ||
695 DKind == OMPD_parallel_sections;
699 return DKind == OMPD_target || DKind == OMPD_target_parallel ||
700 DKind == OMPD_target_parallel_for ||
701 DKind == OMPD_target_parallel_for_simd || DKind == OMPD_target_simd ||
702 DKind == OMPD_target_parallel_loop;
708 assert(
unsigned(DKind) < llvm::omp::Directive_enumSize);
710 case OMPD_metadirective:
711 CaptureRegions.push_back(OMPD_metadirective);
714 case OMPD_parallel_for:
715 case OMPD_parallel_for_simd:
716 case OMPD_parallel_master:
717 case OMPD_parallel_masked:
718 case OMPD_parallel_sections:
719 case OMPD_distribute_parallel_for:
720 case OMPD_distribute_parallel_for_simd:
721 case OMPD_parallel_loop:
722 CaptureRegions.push_back(OMPD_parallel);
724 case OMPD_target_teams:
725 case OMPD_target_teams_distribute:
726 case OMPD_target_teams_distribute_simd:
727 CaptureRegions.push_back(OMPD_task);
728 CaptureRegions.push_back(OMPD_target);
729 CaptureRegions.push_back(OMPD_teams);
732 case OMPD_teams_distribute:
733 case OMPD_teams_distribute_simd:
734 CaptureRegions.push_back(OMPD_teams);
737 case OMPD_target_simd:
738 CaptureRegions.push_back(OMPD_task);
739 CaptureRegions.push_back(OMPD_target);
741 case OMPD_teams_loop:
742 case OMPD_teams_distribute_parallel_for:
743 case OMPD_teams_distribute_parallel_for_simd:
744 CaptureRegions.push_back(OMPD_teams);
745 CaptureRegions.push_back(OMPD_parallel);
747 case OMPD_target_parallel:
748 case OMPD_target_parallel_for:
749 case OMPD_target_parallel_for_simd:
750 case OMPD_target_parallel_loop:
751 CaptureRegions.push_back(OMPD_task);
752 CaptureRegions.push_back(OMPD_target);
753 CaptureRegions.push_back(OMPD_parallel);
756 case OMPD_target_enter_data:
757 case OMPD_target_exit_data:
758 case OMPD_target_update:
759 CaptureRegions.push_back(OMPD_task);
762 case OMPD_taskloop_simd:
763 case OMPD_master_taskloop:
764 case OMPD_master_taskloop_simd:
765 case OMPD_masked_taskloop:
766 case OMPD_masked_taskloop_simd:
767 CaptureRegions.push_back(OMPD_taskloop);
769 case OMPD_parallel_masked_taskloop:
770 case OMPD_parallel_masked_taskloop_simd:
771 case OMPD_parallel_master_taskloop:
772 case OMPD_parallel_master_taskloop_simd:
773 CaptureRegions.push_back(OMPD_parallel);
774 CaptureRegions.push_back(OMPD_taskloop);
776 case OMPD_target_teams_loop:
777 case OMPD_target_teams_distribute_parallel_for:
778 case OMPD_target_teams_distribute_parallel_for_simd:
779 CaptureRegions.push_back(OMPD_task);
780 CaptureRegions.push_back(OMPD_target);
781 CaptureRegions.push_back(OMPD_teams);
782 CaptureRegions.push_back(OMPD_parallel);
785 CaptureRegions.push_back(OMPD_nothing);
800 case OMPD_distribute:
803 case OMPD_target_data:
804 case OMPD_distribute_simd:
807 CaptureRegions.push_back(OMPD_unknown);
813 case OMPD_threadprivate:
819 case OMPD_cancellation_point:
824 case OMPD_declare_reduction:
825 case OMPD_declare_mapper:
826 case OMPD_declare_simd:
827 case OMPD_declare_target:
828 case OMPD_end_declare_target:
830 case OMPD_declare_variant:
831 case OMPD_begin_declare_variant:
832 case OMPD_end_declare_variant:
833 llvm_unreachable(
"OpenMP Directive is not allowed");
836 llvm_unreachable(
"Unknown OpenMP directive");
841 return FailClauseParameter == llvm::omp::OMPC_acquire ||
842 FailClauseParameter == llvm::omp::OMPC_relaxed ||
843 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 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 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.