[flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 11:49:59 PDT 2025
================
@@ -1890,39 +1910,124 @@ bool OmpAttributeVisitor::Pre(const parser::DoConstruct &x) {
return true;
}
+static bool isSizesClause(const parser::OmpClause *clause) {
+ return std::holds_alternative<parser::OmpClause::Sizes>(clause->u);
+}
+
+std::int64_t OmpAttributeVisitor::SetAssociatedMaxClause(
+ llvm::SmallVector<std::int64_t> &levels,
+ llvm::SmallVector<const parser::OmpClause *> &clauses) {
+
+ // Find the tile level to know how much to reduce the level for collapse
+ std::int64_t tileLevel = 0;
+ for (auto [level, clause] : llvm::zip_equal(levels, clauses)) {
+ if (isSizesClause(clause)) {
+ tileLevel = level;
----------------
kparzysz wrote:
Shouldn't it be `tileLevel += level`? You can stack `tile`s...
https://github.com/llvm/llvm-project/pull/143715
More information about the llvm-commits
mailing list