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

Jan Leyonberg via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 03:46:09 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:

I agree that this is best left unchanged. I'm looking into making changes to the genOMP functions so that we can either store the values as you suggest, or update the generated omp.loop_nest op afterwards. It depends on which direction is easier to pass information.

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


More information about the llvm-commits mailing list