21#define Unassociated None
26#define GEN_OMP_CLAUSE_DESCRIPTORS
28#undef GEN_OMP_CLAUSE_DESCRIPTORS
35#define GEN_OMP_CLAUSE_GROUP_DESCRIPTORS
37#undef GEN_OMP_CLAUSE_GROUP_DESCRIPTORS
39#define GEN_OMP_CLAUSE_SET_DESCRIPTORS
41#undef GEN_OMP_CLAUSE_SET_DESCRIPTORS
48#define GEN_OMP_DIRECTIVE_DESCRIPTORS
50#undef GEN_OMP_DIRECTIVE_DESCRIPTORS
57#define GEN_OMP_MODIFIER_DESCRIPTORS
59#undef GEN_OMP_MODIFIER_DESCRIPTORS
66#define GEN_OMP_MODIFIER_GROUP_DESCRIPTORS
68#undef GEN_OMP_MODIFIER_GROUP_DESCRIPTORS
70#define GEN_OMP_MODIFIER_SET_DESCRIPTORS
72#undef GEN_OMP_MODIFIER_SET_DESCRIPTORS
77#define GET_THING_OR_EMPTY(Thing, Member) \
78 template <typename DetailsTy> \
79 static Thing get##Thing##OrEmpty(const DetailsTy &D, Version V) { \
80 V = std::max(V, Version(45)); \
81 if (auto Found = D.find(V); Found != D.end()) \
82 return Found->second.Member; \
93#undef GET_THING_OR_EMPTY
97 return getPropertiesOrEmpty(
Details, V);
100 return getDirectivesOrEmpty(
Details, V);
103 return getModifiersOrEmpty(
Details, V);
106 return getModifierSetsOrEmpty(
Details, V);
110 return getPropertiesOrEmpty(
Details, V);
113 return getClausesOrEmpty(
Details, V);
116 return getDirectivesOrEmpty(
Details, V);
120 return getPropertiesOrEmpty(
Details, V);
129 return getClausesOrEmpty(
Details, V);
132 return getClauseSetsOrEmpty(
Details, V);
137 return getPropertiesOrEmpty(
Details, V);
140 return getClausesOrEmpty(
Details, V);
144 return getPropertiesOrEmpty(
Details, V);
147 return getModifiersOrEmpty(
Details, V);
150 return getClausesOrEmpty(
Details, V);
163 if (Leafs.
size() == 1)
166 static std::map<Directive, descriptor::Directive> Compound;
167 if (
auto F = Compound.find(
D);
F != Compound.end())
179 for (llvm::omp::Directive L : Leafs) {
181 for (
auto &[V,
T] :
Desc.getDetails()) {
182 MaxV = std::max(MaxV, V);
183 auto F = Det.insert({V, Details{}}).first;
187 F->second.Spelling = getOpenMPDirectiveName(
D, V);
193 F->second.Assoc =
T.Assoc;
194 F->second.Cat =
T.Cat;
195 F->second.Cls |=
T.Cls;
196 F->second.ClsSets |=
T.ClsSets;
201 Compound.try_emplace(
D, getOpenMPDirectiveName(
D, MaxV), std::move(Det));
202 return At.first->second;
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
#define GET_THING_OR_EMPTY(Thing, Member)
Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
Get the array size.
DenseMap< Version, DetailsTy > DetailsMap
EnumSet< Modifier > Modifiers
LLVM_ABI const descriptor::Clause & getDescriptor(Clause C)
EnumSet< Directive > Directives
EnumSet< ClauseSet > ClauseSets
const DescriptorMap< Clause, descriptor::Clause > & getClauseMap()
EnumSet< Clause > Clauses
EnumSet< ModifierSet > ModifierSets
LLVM_ABI ArrayRef< Directive > getLeafConstructsOrSelf(Directive D)
const DescriptorMap< ClauseSet, descriptor::ClauseSet > & getClauseSetMap()
DenseMap< Enum, DescriptorTy > DescriptorMap
LLVM_ABI Properties getProperties(Clause C, Version V)
const DescriptorMap< ModifierSet, descriptor::ModifierSet > & getModifierSetMap()
const DescriptorMap< Modifier, descriptor::Modifier > & getModifierMap()
EnumSet< Property > Properties
const DescriptorMap< Directive, descriptor::Directive > & getDirectiveMap()
LLVM_ABI Clauses getClauses(Version V) const
LLVM_ABI Directives getDirectives(Version V) const
LLVM_ABI Properties getProperties(Version V) const
LLVM_ABI Modifiers getModifiers(Version V) const
LLVM_ABI ModifierSets getModifierSets(Version V) const
LLVM_ABI Directives getDirectives(Version V) const
LLVM_ABI Properties getProperties(Version V) const
DetailsMap< details::Clause > Details
LLVM_ABI Association getAssociation(Version V) const
LLVM_ABI Clauses getClauses(Version V) const
LLVM_ABI ClauseSets getClauseSets(Version V) const
LLVM_ABI Properties getProperties(Version V) const
LLVM_ABI Category getCategory(Version V) const
LLVM_ABI Clauses getClauses(Version V) const
LLVM_ABI Modifiers getModifiers(Version V) const
LLVM_ABI Properties getProperties(Version V) const
LLVM_ABI Clauses getClauses(Version V) const
LLVM_ABI Properties getProperties(Version V) const