[Mlir-commits] [mlir] [MLIR] control-flow-sink: don't sink non-pure ops with affine-valid results (PR #218216)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Aug 23 08:26:35 PDT 2026


Peruere1828 wrote:

> I feel that this fix breaks the abstraction of MLIR. It introduces tight coupling between concrete affine concepts and generic control flow pass, which is not quite MLIR-style. I think we should investigate the issue deeply and figure out a more elegant way if possible.

Thanks for the review. Probably we could introduce a new trait/interface in core IR (something like "these operands must be defined at the top level of the enclosing scope, or be pure") for affine ops? The pass then rejects sinking generically based on it.

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


More information about the Mlir-commits mailing list