[flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 08:36:38 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";
----------------
kparzysz wrote:

There should be only one leaf in the compound directive that "sizes" can apply to.  Are you expecting a deviation from this in your implementation?

https://github.com/llvm/llvm-project/pull/143715


More information about the llvm-commits mailing list