[Mlir-commits] [mlir] [MLIR][Linalg][NFC] Simplify tiling canonical pattern (PR #182909)

Jacques Pienaar llvmlistbot at llvm.org
Tue Feb 24 08:08:41 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'
----------------
jpienaar wrote:

I don't know if I consider this a hack. I'd rather just add this TODO below to line 859 (which I think is what you are referring to) and say to make it easier to query canonicalizations of all ops in dialect.

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


More information about the Mlir-commits mailing list