Skip to content

Commit 0891ccc

Browse files
authored
[Frontend][OpenMP] Apply ompx_attribute to all allowing leaf constructs (#100370)
By default, in a compound directive, a clause will apply to the unique leaf construct that allows it. Clauses that could apply to multiple leaf constructs follow different rules. For ompx_attribute, apply it to all leaf constructs that allow it.
1 parent f719a33 commit 0891ccc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ struct ConstructDecompositionT {
236236
const ClauseTy *);
237237
bool applyClause(const tomp::clause::NowaitT<TypeTy, IdTy, ExprTy> &clause,
238238
const ClauseTy *);
239+
bool
240+
applyClause(const tomp::clause::OmpxAttributeT<TypeTy, IdTy, ExprTy> &clause,
241+
const ClauseTy *);
239242

240243
uint32_t version;
241244
llvm::omp::Directive construct;
@@ -1101,6 +1104,13 @@ bool ConstructDecompositionT<C, H>::applyClause(
11011104
return applyToOutermost(node);
11021105
}
11031106

1107+
template <typename C, typename H>
1108+
bool ConstructDecompositionT<C, H>::applyClause(
1109+
const tomp::clause::OmpxAttributeT<TypeTy, IdTy, ExprTy> &clause,
1110+
const ClauseTy *node) {
1111+
return applyToAll(node);
1112+
}
1113+
11041114
template <typename C, typename H> bool ConstructDecompositionT<C, H>::split() {
11051115
bool success = true;
11061116

0 commit comments

Comments
 (0)