[Mlir-commits] [mlir] [mlir][tensor] move tensor insert canonicalization to pattern (PR #142671)

Jeremy Kun llvmlistbot at llvm.org
Wed Jun 4 09:00:58 PDT 2025


================
@@ -176,6 +176,9 @@ void populateFoldConstantExtractSlicePatterns(
           return false;
         });
 
+/// Patterns to fold inserts into a constant into a new constant.
+void populateFoldInsertAfterConstant(RewritePatternSet &patterns);
----------------
j2kun wrote:

> ad-hoc APIs exposing a zoo of patterns that downstream have to somehow managed to package together consistently

It sounds like packaging them in a pass that can later be enhanced with a cost model is a good approach.

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


More information about the Mlir-commits mailing list