18#ifndef LLVM_FRONTEND_OPENMP_CONSTRUCTDECOMPOSITIONT_H
19#define LLVM_FRONTEND_OPENMP_CONSTRUCTDECOMPOSITIONT_H
33#include <unordered_map>
34#include <unordered_set>
39 static llvm::omp::Directive worksharing[] = {
40 llvm::omp::Directive::OMPD_do, llvm::omp::Directive::OMPD_for,
41 llvm::omp::Directive::OMPD_scope, llvm::omp::Directive::OMPD_sections,
42 llvm::omp::Directive::OMPD_single, llvm::omp::Directive::OMPD_workshare,
48 static llvm::omp::Directive worksharingLoop[] = {
49 llvm::omp::Directive::OMPD_do,
50 llvm::omp::Directive::OMPD_for,
52 return worksharingLoop;
56template <
typename Container,
typename Predicate>
57typename std::remove_reference_t<Container>::iterator
59 auto first = std::find_if(container.begin(), container.end(),
pred);
60 if (first == container.end())
62 auto second = std::find_if(std::next(first), container.end(),
pred);
63 if (second == container.end())
65 return container.end();
82template <
typename ClauseType,
typename HelperType>
86 using TypeTy =
typename ClauseTy::TypeTy;
87 using IdTy =
typename ClauseTy::IdTy;
88 using ExprTy =
typename ClauseTy::ExprTy;
92 using ClauseSet = std::unordered_set<const ClauseTy *>;
95 llvm::omp::Directive dir,
97 : version(ver), construct(dir), helper(helper) {
99 nodes.push_back(&clause);
101 bool success = split();
109 for (
auto &leaf : leafs) {
110 output.push_back({leaf.id, {}});
111 auto &out =
output.back();
112 for (
const ClauseTy *c : leaf.clauses)
113 out.clauses.push_back(*c);
122 struct LeafReprInternal {
123 llvm::omp::Directive
id = llvm::omp::Directive::OMPD_unknown;
127 LeafReprInternal *findDirective(llvm::omp::Directive dirId) {
129 leafs, [&](
const LeafReprInternal &leaf) {
return leaf.id == dirId; });
130 return found != leafs.end() ? &*found :
nullptr;
134 if (
auto found = syms.find(
object.id()); found != syms.end())
135 return &found->second;
139 template <
typename S>
140 ClauseTy *makeClause(llvm::omp::Clause clauseId, S &&specific) {
141 implicit.push_back(
typename ClauseTy::BaseT{clauseId, std::move(specific)});
142 return &implicit.back();
153 template <
typename U>
154 void addClauseSymsToMap(
const std::optional<U> &item,
const ClauseTy *);
155 template <
typename U>
157 template <
typename...
U,
size_t... Is>
158 void addClauseSymsToMap(
const std::tuple<U...> &item,
const ClauseTy *,
159 std::index_sequence<Is...> = {});
160 template <
typename U>
161 std::enable_if_t<std::is_enum_v<llvm::remove_cvref_t<U>>,
void>
162 addClauseSymsToMap(U &&item,
const ClauseTy *);
164 template <
typename U>
165 std::enable_if_t<llvm::remove_cvref_t<U>::EmptyTrait::value,
void>
166 addClauseSymsToMap(U &&item,
const ClauseTy *);
168 template <
typename U>
169 std::enable_if_t<llvm::remove_cvref_t<U>::IncompleteTrait::value,
void>
170 addClauseSymsToMap(U &&item,
const ClauseTy *);
172 template <
typename U>
173 std::enable_if_t<llvm::remove_cvref_t<U>::WrapperTrait::value,
void>
174 addClauseSymsToMap(U &&item,
const ClauseTy *);
176 template <
typename U>
177 std::enable_if_t<llvm::remove_cvref_t<U>::TupleTrait::value,
void>
178 addClauseSymsToMap(U &&item,
const ClauseTy *);
180 template <
typename U>
181 std::enable_if_t<llvm::remove_cvref_t<U>::UnionTrait::value,
void>
182 addClauseSymsToMap(U &&item,
const ClauseTy *);
187 bool applyToUnique(
const ClauseTy *node);
191 template <
typename Iterator>
196 bool applyToInnermost(
const ClauseTy *node);
200 bool applyToOutermost(
const ClauseTy *node);
202 template <
typename Predicate>
205 bool applyToAll(
const ClauseTy *node);
207 template <
typename Clause>
208 bool applyClause(Clause &&clause,
const ClauseTy *node);
246 llvm::omp::Directive construct;
248 ListT<LeafReprInternal> leafs;
250 std::list<ClauseTy> implicit;
252 std::unordered_map<IdTy, ClauseSet> syms;
253 std::unordered_set<IdTy> mapBases;
257template <
typename ClauseType,
typename HelperType>
262template <
typename C,
typename H>
264 const ClauseTy *node) {
265 syms[
object.id()].insert(node);
268template <
typename C,
typename H>
269void ConstructDecompositionT<C, H>::addClauseSymsToMap(
271 for (
auto &
object : objects)
272 syms[
object.id()].insert(node);
275template <
typename C,
typename H>
276void ConstructDecompositionT<C, H>::addClauseSymsToMap(
const TypeTy &item,
277 const ClauseTy *node) {
281template <
typename C,
typename H>
282void ConstructDecompositionT<C, H>::addClauseSymsToMap(
const ExprTy &item,
283 const ClauseTy *node) {
287template <
typename C,
typename H>
288void ConstructDecompositionT<C, H>::addClauseSymsToMap(
290 const ClauseTy *node) {
291 auto &objects = std::get<tomp::ObjectListT<IdTy, ExprTy>>(item.
t);
292 addClauseSymsToMap(objects, node);
293 for (
auto &
object : objects) {
294 if (
auto base = helper.getBaseObject(
object))
295 mapBases.insert(base->id());
299template <
typename C,
typename H>
301void ConstructDecompositionT<C, H>::addClauseSymsToMap(
302 const std::optional<U> &item,
const ClauseTy *node) {
304 addClauseSymsToMap(*item, node);
307template <
typename C,
typename H>
309void ConstructDecompositionT<C, H>::addClauseSymsToMap(
312 addClauseSymsToMap(s, node);
315template <
typename C,
typename H>
316template <
typename...
U,
size_t... Is>
317void ConstructDecompositionT<C, H>::addClauseSymsToMap(
318 const std::tuple<U...> &item,
const ClauseTy *node,
319 std::index_sequence<Is...>) {
321 (addClauseSymsToMap(std::get<Is>(item), node), ...);
324template <
typename C,
typename H>
326std::enable_if_t<std::is_enum_v<llvm::remove_cvref_t<U>>,
void>
327ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
328 const ClauseTy *node) {
332template <
typename C,
typename H>
334std::enable_if_t<llvm::remove_cvref_t<U>::EmptyTrait::value,
void>
335ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
336 const ClauseTy *node) {
340template <
typename C,
typename H>
342std::enable_if_t<llvm::remove_cvref_t<U>::IncompleteTrait::value,
void>
343ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
344 const ClauseTy *node) {
348template <
typename C,
typename H>
350std::enable_if_t<llvm::remove_cvref_t<U>::WrapperTrait::value,
void>
351ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
352 const ClauseTy *node) {
353 addClauseSymsToMap(item.v, node);
356template <
typename C,
typename H>
358std::enable_if_t<llvm::remove_cvref_t<U>::TupleTrait::value,
void>
359ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
360 const ClauseTy *node) {
361 constexpr size_t tuple_size =
363 addClauseSymsToMap(item.t, node, std::make_index_sequence<tuple_size>{});
366template <
typename C,
typename H>
368std::enable_if_t<llvm::remove_cvref_t<U>::UnionTrait::value,
void>
369ConstructDecompositionT<C, H>::addClauseSymsToMap(U &&item,
370 const ClauseTy *node) {
371 std::visit([&](
auto &&s) { addClauseSymsToMap(s, node); }, item.u);
377template <
typename C,
typename H>
378bool ConstructDecompositionT<C, H>::applyToUnique(
const ClauseTy *node) {
380 return llvm::omp::isAllowedClauseForDirective(leaf.id, node->id, version);
383 if (unique != leafs.end()) {
384 unique->clauses.push_back(node);
392template <
typename C,
typename H>
393template <
typename Iterator>
394bool ConstructDecompositionT<C, H>::applyToFirst(
399 for (
auto &leaf : range) {
400 if (!llvm::omp::isAllowedClauseForDirective(leaf.id, node->id, version))
402 leaf.clauses.push_back(node);
410template <
typename C,
typename H>
411bool ConstructDecompositionT<C, H>::applyToInnermost(
const ClauseTy *node) {
417template <
typename C,
typename H>
418bool ConstructDecompositionT<C, H>::applyToOutermost(
const ClauseTy *node) {
422template <
typename C,
typename H>
423template <
typename Predicate>
424bool ConstructDecompositionT<C, H>::applyIf(
const ClauseTy *node,
426 bool applied =
false;
427 for (
auto &leaf : leafs) {
428 if (!llvm::omp::isAllowedClauseForDirective(leaf.id, node->id, version))
432 leaf.clauses.push_back(node);
439template <
typename C,
typename H>
440bool ConstructDecompositionT<C, H>::applyToAll(
const ClauseTy *node) {
441 return applyIf(node, [](
auto) {
return true; });
444template <
typename C,
typename H>
445template <
typename Specific>
455 if (applyToUnique(node))
468template <
typename C,
typename H>
471 const ClauseTy *node) {
474 if (!leafs.empty()) {
475 auto &last = leafs.back();
477 if (llvm::omp::isAllowedClauseForDirective(last.id, node->id, version)) {
478 last.clauses.push_back(node);
494template <
typename C,
typename H>
495bool ConstructDecompositionT<C, H>::applyClause(
497 const ClauseTy *node) {
498 return applyToInnermost(node);
531template <
typename C,
typename H>
532bool ConstructDecompositionT<C, H>::applyClause(
534 const ClauseTy *node) {
535 bool applied =
false;
538 auto dirDistribute = findDirective(llvm::omp::OMPD_distribute);
539 auto dirTeams = findDirective(llvm::omp::OMPD_teams);
540 if (dirDistribute !=
nullptr) {
541 dirDistribute->clauses.push_back(node);
544 if (dirTeams !=
nullptr) {
545 auto *shared = makeClause(
546 llvm::omp::Clause::OMPC_shared,
548 dirTeams->clauses.push_back(shared);
550 }
else if (dirTeams !=
nullptr) {
551 dirTeams->clauses.push_back(node);
556 auto findWorksharing = [&]() {
558 for (
auto &leaf : leafs) {
559 auto found =
llvm::find(worksharing, leaf.id);
560 if (found != std::end(worksharing))
563 return static_cast<typename decltype(leafs)::value_type *
>(
nullptr);
566 auto dirWorksharing = findWorksharing();
567 if (dirWorksharing !=
nullptr) {
568 dirWorksharing->clauses.push_back(node);
573 auto dirTaskloop = findDirective(llvm::omp::OMPD_taskloop);
574 if (dirTaskloop !=
nullptr) {
575 dirTaskloop->clauses.push_back(node);
580 auto dirParallel = findDirective(llvm::omp::OMPD_parallel);
581 if (dirParallel !=
nullptr) {
582 if (dirTaskloop ==
nullptr && dirWorksharing ==
nullptr) {
583 dirParallel->clauses.push_back(node);
587 auto *shared = makeClause(
588 llvm::omp::Clause::OMPC_shared,
590 dirParallel->clauses.push_back(shared);
595 auto inLastprivate = [&](
const ObjectTy &object) {
596 if (ClauseSet *set = findClausesWith(
object)) {
598 return c->id == llvm::omp::Clause::OMPC_lastprivate;
604 auto dirTarget = findDirective(llvm::omp::OMPD_target);
605 if (dirTarget !=
nullptr) {
608 clause.
v, std::back_inserter(objects), [&](
const ObjectTy &
object) {
609 return !inLastprivate(object) && !mapBases.count(object.id());
611 if (!objects.
empty()) {
612 auto *firstp = makeClause(
613 llvm::omp::Clause::OMPC_firstprivate,
615 dirTarget->clauses.push_back(firstp);
621 if (
auto dirTask = findDirective(llvm::omp::OMPD_task)) {
622 dirTask->clauses.push_back(node);
648template <
typename C,
typename H>
649bool ConstructDecompositionT<C, H>::applyClause(
651 const ClauseTy *node) {
652 bool applied =
false;
655 applied = applyToAll(node);
659 auto inFirstprivate = [&](
const ObjectTy &object) {
660 if (ClauseSet *set = findClausesWith(
object)) {
662 return c->id == llvm::omp::Clause::OMPC_firstprivate;
668 auto &objects = std::get<tomp::ObjectListT<IdTy, ExprTy>>(clause.
t);
673 objects, std::back_inserter(sharedObjects),
674 [&](
const ObjectTy &
object) {
return !inFirstprivate(
object); });
676 if (!sharedObjects.empty()) {
678 if (
auto dirParallel = findDirective(llvm::omp::OMPD_parallel)) {
679 auto *shared = makeClause(
680 llvm::omp::Clause::OMPC_shared,
682 dirParallel->clauses.push_back(shared);
687 if (
auto dirTeams = findDirective(llvm::omp::OMPD_teams)) {
688 auto *shared = makeClause(
689 llvm::omp::Clause::OMPC_shared,
691 dirTeams->clauses.push_back(shared);
697 if (
auto dirTarget = findDirective(llvm::omp::OMPD_target)) {
700 objects, std::back_inserter(tofrom),
701 [&](
const ObjectTy &
object) {
return !mapBases.count(
object.
id()); });
703 if (!tofrom.
empty()) {
707 makeClause(llvm::omp::Clause::OMPC_map,
711 std::nullopt, std::nullopt,
712 std::move(tofrom)}});
713 dirTarget->clauses.push_back(map);
728template <
typename C,
typename H>
729bool ConstructDecompositionT<C, H>::applyClause(
731 const ClauseTy *node) {
733 return applyToAll(node);
743template <
typename C,
typename H>
744bool ConstructDecompositionT<C, H>::applyClause(
746 const ClauseTy *node) {
748 return applyToAll(node);
758template <
typename C,
typename H>
759bool ConstructDecompositionT<C, H>::applyClause(
761 const ClauseTy *node) {
763 return applyToAll(node);
773template <
typename C,
typename H>
774bool ConstructDecompositionT<C, H>::applyClause(
776 const ClauseTy *node) {
778 return applyToAll(node);
790template <
typename C,
typename H>
791bool ConstructDecompositionT<C, H>::applyClause(
793 const ClauseTy *node) {
798 auto canMakePrivateCopy = [](llvm::omp::Clause
id) {
801 case llvm::omp::Clause::OMPC_firstprivate:
802 case llvm::omp::Clause::OMPC_in_reduction:
803 case llvm::omp::Clause::OMPC_lastprivate:
804 case llvm::omp::Clause::OMPC_linear:
805 case llvm::omp::Clause::OMPC_private:
806 case llvm::omp::Clause::OMPC_reduction:
807 case llvm::omp::Clause::OMPC_task_reduction:
814 bool applied = applyIf(node, [&](
const auto &leaf) {
815 return llvm::any_of(leaf.clauses, [&](
const ClauseTy *n) {
816 return canMakePrivateCopy(n->id);
849template <
typename C,
typename H>
850bool ConstructDecompositionT<C, H>::applyClause(
852 const ClauseTy *node) {
856 bool applyToParallel =
true, applyToTeams =
true;
858 auto dirParallel = findDirective(llvm::omp::Directive::OMPD_parallel);
860 auto exclusions = llvm::concat<const llvm::omp::Directive>(
862 llvm::omp::Directive::OMPD_loop,
863 llvm::omp::Directive::OMPD_sections,
864 llvm::omp::Directive::OMPD_taskloop,
866 auto present = [&](llvm::omp::Directive
id) {
867 return findDirective(
id) !=
nullptr;
871 applyToParallel =
false;
874 auto dirTeams = findDirective(llvm::omp::Directive::OMPD_teams);
877 if (findDirective(llvm::omp::Directive::OMPD_loop))
878 applyToTeams =
false;
881 using ReductionModifier =
typename ReductionTy::ReductionModifier;
882 using ReductionIdentifiers =
typename ReductionTy::ReductionIdentifiers;
884 auto &objects = std::get<tomp::ObjectListT<IdTy, ExprTy>>(clause.
t);
885 auto &modifier = std::get<std::optional<ReductionModifier>>(clause.
t);
890 bool applied =
false;
893 auto isValidModifier = [](llvm::omp::Directive dir, ReductionModifier
mod,
894 bool alreadyApplied) {
896 case ReductionModifier::Inscan:
899 return dir == llvm::omp::Directive::OMPD_simd ||
901 case ReductionModifier::Task:
906 return dir == llvm::omp::Directive::OMPD_parallel ||
908 case ReductionModifier::Default:
914 auto *unmodified = makeClause(
915 llvm::omp::Clause::OMPC_reduction,
918 std::get<ReductionIdentifiers>(clause.
t),
921 ReductionModifier effective = modifier.value_or(ReductionModifier::Default);
922 bool effectiveApplied =
false;
926 if (!llvm::omp::isAllowedClauseForDirective(leaf.id, node->id, version))
928 if (!applyToParallel && &leaf == dirParallel)
930 if (!applyToTeams && &leaf == dirTeams)
933 if (isValidModifier(leaf.id, effective, effectiveApplied)) {
935 leaf.clauses.push_back(node);
936 effectiveApplied =
true;
939 leaf.clauses.push_back(unmodified);
942 applied = effectiveApplied;
950 [&](
const ObjectTy &
object) {
951 auto maybeBase = helper.getBaseObject(
object);
952 return maybeBase ? *maybeBase : object;
956 if (!sharedObjects.
empty()) {
957 if (dirParallel && !applyToParallel) {
958 auto *shared = makeClause(
959 llvm::omp::Clause::OMPC_shared,
961 dirParallel->clauses.push_back(shared);
963 if (dirTeams && !applyToTeams) {
964 auto *shared = makeClause(
965 llvm::omp::Clause::OMPC_shared,
967 dirTeams->clauses.push_back(shared);
972 auto dirTarget = findDirective(llvm::omp::Directive::OMPD_target);
973 if (dirTarget && leafs.size() > 1) {
976 [&](
const ObjectTy &
object) {
977 if (
auto maybeBase = helper.getBaseObject(
object))
978 return !mapBases.count(maybeBase->id());
979 return !mapBases.count(
object.id());
981 if (!tofrom.
empty()) {
984 auto *map = makeClause(
985 llvm::omp::Clause::OMPC_map,
987 {MapType::Tofrom, std::nullopt,
988 std::nullopt, std::nullopt,
989 std::move(tofrom)}});
991 dirTarget->clauses.push_back(map);
1010template <
typename C,
typename H>
1011bool ConstructDecompositionT<C, H>::applyClause(
1013 const ClauseTy *node) {
1014 using DirectiveNameModifier =
1017 auto &modifier = std::get<std::optional<DirectiveNameModifier>>(clause.
t);
1020 llvm::omp::Directive dirId = *modifier;
1022 makeClause(llvm::omp::Clause::OMPC_if,
1025 std::get<IfExpression>(clause.
t)}});
1027 if (
auto *hasDir = findDirective(dirId)) {
1028 hasDir->clauses.push_back(unmodified);
1034 return applyToAll(node);
1054template <
typename C,
typename H>
1055bool ConstructDecompositionT<C, H>::applyClause(
1057 const ClauseTy *node) {
1059 if (!applyToInnermost(node))
1063 auto dirSimd = findDirective(llvm::omp::Directive::OMPD_simd);
1064 std::optional<ObjectTy> iterVar = helper.getLoopIterVar();
1065 const auto &objects = std::get<tomp::ObjectListT<IdTy, ExprTy>>(clause.
t);
1071 for (
const ObjectTy &
object : objects) {
1072 last.push_back(
object);
1073 if (!dirSimd || !iterVar ||
object.
id() != iterVar->id())
1074 first.push_back(
object);
1077 if (!first.empty()) {
1078 auto *firstp = makeClause(
1079 llvm::omp::Clause::OMPC_firstprivate,
1081 nodes.push_back(firstp);
1083 if (!
last.empty()) {
1085 makeClause(llvm::omp::Clause::OMPC_lastprivate,
1087 {std::nullopt,
last}});
1088 nodes.push_back(lastp);
1101template <
typename C,
typename H>
1102bool ConstructDecompositionT<C, H>::applyClause(
1104 const ClauseTy *node) {
1105 return applyToOutermost(node);
1108template <
typename C,
typename H>
1109bool ConstructDecompositionT<C, H>::applyClause(
1111 const ClauseTy *node) {
1112 return applyToOutermost(node);
1115template <
typename C,
typename H>
1116bool ConstructDecompositionT<C, H>::applyClause(
1118 const ClauseTy *node) {
1119 return applyToAll(node);
1122template <
typename C,
typename H>
bool ConstructDecompositionT<C, H>::split() {
1125 auto isImplicit = [
this](
const ClauseTy *node) {
1127 implicit, [node](
const ClauseTy &clause) {
return &clause == node; });
1130 for (llvm::omp::Directive leaf :
1132 leafs.push_back(LeafReprInternal{leaf, {}});
1134 for (
const ClauseTy *node :
nodes)
1135 addClauseSymsToMap(*node, node);
1142 for (
const ClauseTy *node :
nodes) {
1143 if (node->id == llvm::omp::Clause::OMPC_linear)
1146 for (
const auto *node : linears) {
1155 auto skip = [](
const ClauseTy *node) {
1157 case llvm::omp::Clause::OMPC_allocate:
1158 case llvm::omp::Clause::OMPC_linear:
1166 for (
const ClauseTy *node :
nodes) {
1170 std::visit([&](
auto &&s) {
return applyClause(s, node); }, node->u);
1171 if (!isImplicit(node))
1172 success = success && result;
1176 for (
const ClauseTy *node :
nodes) {
1177 if (node->id != llvm::omp::Clause::OMPC_allocate)
1181 std::visit([&](
auto &&s) {
return applyClause(s, node); }, node->u);
Unify divergent function exit nodes
static llvm::ArrayRef< llvm::omp::Directive > getWorksharing()
static llvm::ArrayRef< llvm::omp::Directive > getWorksharingLoop()
static bool shouldApply(Function &F, ProfileSummaryInfo &PSI)
static bool skip(DataExtractor &Data, uint64_t &Offset, bool SkippedRanges)
Skip an InlineInfo object in the specified data at the specified offset.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
void push_back(const T &Elt)
A range adaptor for a pair of iterators.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
std::remove_reference_t< Container >::iterator find_unique(Container &&container, Predicate &&pred)
ArrayRef< Directive > getLeafConstructsOrSelf(Directive D)
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
LLVM_ATTRIBUTE_ALWAYS_INLINE DynamicAPInt mod(const DynamicAPInt &LHS, const DynamicAPInt &RHS)
is always non-negative.
auto unique(Range &&R, Predicate P)
OutputIt copy_if(R &&Range, OutputIt Out, UnaryPredicate P)
Provide wrappers to std::copy_if which take ranges instead of having to pass begin/end explicitly.
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
auto reverse(ContainerTy &&C)
typename llvm::remove_cvref< T >::type remove_cvref_t
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
LogicalResult success(bool IsSuccess=true)
Utility function to generate a LogicalResult.
typename ClauseTy::ExprTy ExprTy
std::unordered_set< const ClauseTy * > ClauseSet
typename ClauseTy::TypeTy TypeTy
typename ClauseTy::IdTy IdTy
tomp::ObjectT< IdTy, ExprTy > ObjectTy
ConstructDecompositionT(uint32_t ver, HelperType &helper, llvm::omp::Directive dir, llvm::ArrayRef< ClauseTy > clauses)
tomp::ListT< DirectiveWithClauses< ClauseType > > output
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
type::DirectiveName DirectiveNameModifier
std::tuple< OPT(LastprivateModifier), List > t
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator), LocatorList > t
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t