[Mlir-commits] [mlir] [MLIR][Linalg][NFC] Simplify tiling canonical pattern (PR #182909)
Renato Golin
llvmlistbot at llvm.org
Tue Feb 24 08:19:15 PST 2026
================
@@ -844,39 +847,33 @@ class CanonicalizationPatternList<OpTy, OpTypes...> {
CanonicalizationPatternList<OpTypes...>::insert(patterns);
}
};
-} // namespace
-
-RewritePatternSet
-mlir::linalg::getLinalgTilingCanonicalizationPatterns(MLIRContext *ctx) {
- RewritePatternSet patterns(ctx);
- populateLinalgTilingCanonicalizationPatterns(patterns);
- return patterns;
-}
-void mlir::linalg::populateLinalgTilingCanonicalizationPatterns(
- RewritePatternSet &patterns) {
+/// TODO: Move this into `getCanonicalizationPattern` and do the same for all
+/// dialects, so that we don't need this hack to also get the operations'
----------------
rengolin wrote:
The _hach_ is having to have static functions to do something that the API should do on its own. This has been my biggest issue when trying to rewrite the canonicalizers, and why I got to this PR. I'll remove the term _hack_ on my next PR.
https://github.com/llvm/llvm-project/pull/182909
More information about the Mlir-commits
mailing list