[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'
Michael Kruse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 14 17:25:52 PDT 2020
Meinersbur marked an inline comment as done.
Meinersbur added inline comments.
================
Comment at: clang/include/clang/AST/StmtOpenMP.h:4781-4784
+/// This represents the '#pragma omp tile' loop transformation directive.
+class OMPTileDirective final
+ : public OMPLoopDirective,
+ private llvm::TrailingObjects<OMPTileDirective, OMPClause *, Stmt *> {
----------------
ABataev wrote:
> Not sure that this is a good idea to treat this directive as the executable directive. To me, it looks like kind of `AttributedStmt`. Maybe better to introduce some kind of a new base node for this and similar constructs, which does not own the loop but is its kind of attribute-like entity?
> Also, can we have something like:
> ```
> #pragma omp simd
> #pragma omp tile ...
> for(...) ;
> ```
> Thoughts?
While not executed at runtime, syntactically it is parsed like a executable (loop-associated) directive. IMHO it does 'own' the loop, but produces another one for to be owned(/associated) by a different directive, as in your tile/simd example, which should already work. Allowing this was the motivation to do the transformation on the AST-level for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76342/new/
https://reviews.llvm.org/D76342
More information about the cfe-commits
mailing list