[flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)
Jan Leyonberg via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 05:52:37 PDT 2025
================
@@ -482,6 +484,28 @@ bool ConstructDecompositionT<C, H>::applyClause(
return false;
}
+// FIXME(JAN): Do the correct thing, but for now we'll do the same as collapse
+template <typename C, typename H>
+bool ConstructDecompositionT<C, H>::applyClause(
+ const tomp::clause::SizesT<TypeTy, IdTy, ExprTy> &clause,
+ const ClauseTy *node) {
+ // Apply "sizes" to the innermost directive. If it's not one that
+ // allows it flag an error.
+ if (!leafs.empty()) {
+ auto &last = leafs.back();
+
+ if (llvm::omp::isAllowedClauseForDirective(last.id, node->id, version)) {
+ last.clauses.push_back(node);
+ return true;
+ } else {
+ // llvm::errs() << "** OVERRIDING isAllowedClauseForDirective **\n";
----------------
jsjodin wrote:
@kparzysz I'm not sure if there is a way to override this in a cleaner way? Is it easy to introduce a new internal clause (e..g tile_sizes) and instead of just moving the sizes clause from tile to the outer construct, we instead translate it into the internal clause? I'm not sure if there are surrounding data structures that will make this hard, like location information and such?
https://github.com/llvm/llvm-project/pull/143715
More information about the llvm-commits
mailing list