[Mlir-commits] [mlir] [milr][memref]: Add control options to FoldMemrefAliasOps (PR #178405)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 28 10:37:30 PST 2026


https://github.com/MaheshRavishankar requested changes to this pull request.

I think this is an anti-pattern.  Firstly I think you dont need to add a way to move the control function all the way into the pattern and abort there. That is unnecessary overhead. I think you can just tell the pattern rewrite driver to exclude some patterns.

Secondly, did you hit an issue? This pass is expected to be used to basically fold away all the subviews cause subviews are just meant to add offsets, and this pass materializes the offset in all its uses. Not doing that seems like this pass is not used as intended.

Broadly adding callbacks this way makes reproducers not work, so it is discouraged.

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


More information about the Mlir-commits mailing list