[Mlir-commits] [mlir] feat(linalg): add a way to pass controlFn to `foldIntoPackUnpackPatterns` (PR #143685)

Ege Beysel llvmlistbot at llvm.org
Thu Jun 12 23:15:06 PDT 2025


egebeysel wrote:

> I think this is an indication that you dont want to be using pattern application. In such situations we have found it better to expose the core transformation done by the pattern as a function and then just call that function using a pass downstream. You can the have whatever control you want in that pass.

Sure, I can do that. One thing I had in mind while doing this was the compatibility with current downstream users of the pattern. I guess with that change, users would also have to adjust to it.

Also, just to clarify this, in that case, I would expose _every_ pattern inside `populateFoldIntoPackUnpackPatterns` as functions, right?



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


More information about the Mlir-commits mailing list